teritorio 2025.11.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ # BSD 3-Clause License
2
+
3
+ Copyright © 2025 Stephanos Kuma.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.3
2
+ Name: teritorio
3
+ Version: 2025.11.11
4
+ Summary: A library for country and currency ISO codes
5
+ Home-page: https://teritorio.readthedocs.io/en/stable/
6
+ License: BSD-3-Clause
7
+ Keywords: country,currency,iso
8
+ Author: Stephanos Kuma
9
+ Author-email: "Stephanos Kuma" <stephanos@kuma.ai>
10
+ Requires-Python: >=3.10
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Financial and Insurance Industry
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Requires-Dist: pyutilkit (~=0.11)
17
+ Project-URL: Documentation, https://teritorio.readthedocs.io/en/stable/
18
+ Project-URL: Repository, https://github.com/spapanik/teritorio
19
+ Description-Content-Type: text/markdown
20
+
21
+ # teritorio: ISO codes for countries and currencies
22
+
23
+ [![build][build_badge]][build_url]
24
+ [![lint][lint_badge]][lint_url]
25
+ [![tests][tests_badge]][tests_url]
26
+ [![license][licence_badge]][licence_url]
27
+ [![codecov][codecov_badge]][codecov_url]
28
+ [![readthedocs][readthedocs_badge]][readthedocs_url]
29
+ [![pypi][pypi_badge]][pypi_url]
30
+ [![downloads][pepy_badge]][pepy_url]
31
+ [![build automation: yam][yam_badge]][yam_url]
32
+ [![Lint: ruff][ruff_badge]][ruff_url]
33
+
34
+ `teritorio` two iterable singletons that `Countries` and `Currencies`,
35
+ that contain all the relevant ISO information about countries and
36
+ currencies, respectively.
37
+
38
+ ## Versioning
39
+
40
+ The project project adheres to [Calendar Versioning](https://calver.org). The reason is that the data are
41
+ dominated by political decisions, making semantic versioning largely irrelevant.
42
+
43
+ ## Links
44
+
45
+ - [Documentation]
46
+ - [Changelog]
47
+
48
+ [build_badge]: https://github.com/spapanik/teritorio/actions/workflows/build.yml/badge.svg
49
+ [build_url]: https://github.com/spapanik/teritorio/actions/workflows/build.yml
50
+ [lint_badge]: https://github.com/spapanik/teritorio/actions/workflows/lint.yml/badge.svg
51
+ [lint_url]: https://github.com/spapanik/teritorio/actions/workflows/lint.yml
52
+ [tests_badge]: https://github.com/spapanik/teritorio/actions/workflows/tests.yml/badge.svg
53
+ [tests_url]: https://github.com/spapanik/teritorio/actions/workflows/tests.yml
54
+ [licence_badge]: https://img.shields.io/pypi/l/teritorio
55
+ [licence_url]: https://teritorio.readthedocs.io/en/stable/LICENSE/
56
+ [codecov_badge]: https://codecov.io/github/spapanik/teritorio/graph/badge.svg?token=Q20F84BW72
57
+ [codecov_url]: https://codecov.io/github/spapanik/teritorio
58
+ [readthedocs_badge]: https://readthedocs.org/projects/teritorio/badge/?version=latest
59
+ [readthedocs_url]: https://teritorio.readthedocs.io/en/latest/
60
+ [pypi_badge]: https://img.shields.io/pypi/v/teritorio
61
+ [pypi_url]: https://pypi.org/project/teritorio
62
+ [pepy_badge]: https://pepy.tech/badge/teritorio
63
+ [pepy_url]: https://pepy.tech/project/teritorio
64
+ [yam_badge]: https://img.shields.io/badge/build%20automation-yamk-success
65
+ [yam_url]: https://github.com/spapanik/yamk
66
+ [ruff_badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json
67
+ [ruff_url]: https://github.com/charliermarsh/ruff
68
+ [Documentation]: https://teritorio.readthedocs.io/en/stable/
69
+ [Changelog]: https://teritorio.readthedocs.io/en/stable/CHANGELOG/
70
+ [Calendar Versioning]: https://calver.org
@@ -0,0 +1,50 @@
1
+ # teritorio: ISO codes for countries and currencies
2
+
3
+ [![build][build_badge]][build_url]
4
+ [![lint][lint_badge]][lint_url]
5
+ [![tests][tests_badge]][tests_url]
6
+ [![license][licence_badge]][licence_url]
7
+ [![codecov][codecov_badge]][codecov_url]
8
+ [![readthedocs][readthedocs_badge]][readthedocs_url]
9
+ [![pypi][pypi_badge]][pypi_url]
10
+ [![downloads][pepy_badge]][pepy_url]
11
+ [![build automation: yam][yam_badge]][yam_url]
12
+ [![Lint: ruff][ruff_badge]][ruff_url]
13
+
14
+ `teritorio` two iterable singletons that `Countries` and `Currencies`,
15
+ that contain all the relevant ISO information about countries and
16
+ currencies, respectively.
17
+
18
+ ## Versioning
19
+
20
+ The project project adheres to [Calendar Versioning](https://calver.org). The reason is that the data are
21
+ dominated by political decisions, making semantic versioning largely irrelevant.
22
+
23
+ ## Links
24
+
25
+ - [Documentation]
26
+ - [Changelog]
27
+
28
+ [build_badge]: https://github.com/spapanik/teritorio/actions/workflows/build.yml/badge.svg
29
+ [build_url]: https://github.com/spapanik/teritorio/actions/workflows/build.yml
30
+ [lint_badge]: https://github.com/spapanik/teritorio/actions/workflows/lint.yml/badge.svg
31
+ [lint_url]: https://github.com/spapanik/teritorio/actions/workflows/lint.yml
32
+ [tests_badge]: https://github.com/spapanik/teritorio/actions/workflows/tests.yml/badge.svg
33
+ [tests_url]: https://github.com/spapanik/teritorio/actions/workflows/tests.yml
34
+ [licence_badge]: https://img.shields.io/pypi/l/teritorio
35
+ [licence_url]: https://teritorio.readthedocs.io/en/stable/LICENSE/
36
+ [codecov_badge]: https://codecov.io/github/spapanik/teritorio/graph/badge.svg?token=Q20F84BW72
37
+ [codecov_url]: https://codecov.io/github/spapanik/teritorio
38
+ [readthedocs_badge]: https://readthedocs.org/projects/teritorio/badge/?version=latest
39
+ [readthedocs_url]: https://teritorio.readthedocs.io/en/latest/
40
+ [pypi_badge]: https://img.shields.io/pypi/v/teritorio
41
+ [pypi_url]: https://pypi.org/project/teritorio
42
+ [pepy_badge]: https://pepy.tech/badge/teritorio
43
+ [pepy_url]: https://pepy.tech/project/teritorio
44
+ [yam_badge]: https://img.shields.io/badge/build%20automation-yamk-success
45
+ [yam_url]: https://github.com/spapanik/yamk
46
+ [ruff_badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json
47
+ [ruff_url]: https://github.com/charliermarsh/ruff
48
+ [Documentation]: https://teritorio.readthedocs.io/en/stable/
49
+ [Changelog]: https://teritorio.readthedocs.io/en/stable/CHANGELOG/
50
+ [Calendar Versioning]: https://calver.org
@@ -0,0 +1,181 @@
1
+ [build-system]
2
+ requires = [
3
+ "phosphorus>=0.10",
4
+ ]
5
+ build-backend = "phosphorus.construction.api"
6
+
7
+ [project]
8
+ name = "teritorio"
9
+ dynamic = [
10
+ "version",
11
+ ]
12
+
13
+ authors = [
14
+ { name = "Stephanos Kuma", email = "stephanos@kuma.ai" },
15
+ ]
16
+ license = { text = "BSD-3-Clause" }
17
+
18
+ readme = "docs/README.md"
19
+ description = "A library for country and currency ISO codes"
20
+ keywords = [
21
+ "iso",
22
+ "currency",
23
+ "country",
24
+ ]
25
+ classifiers = [
26
+ "Development Status :: 5 - Production/Stable",
27
+ "Operating System :: OS Independent",
28
+ "Programming Language :: Python :: 3 :: Only",
29
+ "License :: OSI Approved :: BSD License",
30
+ "Intended Audience :: Financial and Insurance Industry",
31
+ ]
32
+
33
+ requires-python = ">=3.10"
34
+ dependencies = [
35
+ "pyutilkit~=0.11",
36
+ ]
37
+
38
+ [project.urls]
39
+ homepage = "https://teritorio.readthedocs.io/en/stable/"
40
+ repository = "https://github.com/spapanik/teritorio"
41
+ documentation = "https://teritorio.readthedocs.io/en/stable/"
42
+
43
+ [dependency-groups]
44
+ dev = [
45
+ "beautifulsoup4~=4.12",
46
+ "ipdb~=0.13",
47
+ "ipython~=8.37",
48
+ "lxml~=6.0",
49
+ "ptpython~=3.0",
50
+ { include-group = "lint" },
51
+ { include-group = "test" },
52
+ { include-group = "docs" },
53
+ ]
54
+ lint = [
55
+ "mypy~=1.18", # Keep mypy for CI/CD
56
+ "ty~=0.0.1a26",
57
+ "ruff~=0.13",
58
+ "types-beautifulsoup4~=4.12",
59
+ { include-group = "test_core" },
60
+ ]
61
+ test = [
62
+ "pytest-cov~=7.0",
63
+ { include-group = "test_core" },
64
+ ]
65
+ test_core = [
66
+ "pytest~=9.0",
67
+ ]
68
+ docs = [
69
+ "mkdocs~=1.6",
70
+ "mkdocs-material~=9.6",
71
+ "mkdocs-material-extensions~=1.3",
72
+ "pygments~=2.19",
73
+ "pymdown-extensions~=10.15",
74
+ ]
75
+
76
+ [tool.phosphorus.dynamic]
77
+ version = { file = "src/teritorio/__version__.py" }
78
+
79
+ [tool.mypy]
80
+ # Keep mypy for CI/CD
81
+ check_untyped_defs = true
82
+ disallow_any_decorated = true
83
+ disallow_any_explicit = true
84
+ disallow_any_expr = false # many builtins are Any
85
+ disallow_any_generics = true
86
+ disallow_any_unimported = true
87
+ disallow_incomplete_defs = true
88
+ disallow_subclassing_any = true
89
+ disallow_untyped_calls = true
90
+ disallow_untyped_decorators = true
91
+ disallow_untyped_defs = true
92
+ extra_checks = true
93
+ ignore_missing_imports = true
94
+ no_implicit_reexport = true
95
+ show_column_numbers = true
96
+ show_error_codes = true
97
+ strict_equality = true
98
+ warn_redundant_casts = true
99
+ warn_return_any = true
100
+ warn_unused_configs = true
101
+ warn_unused_ignores = true
102
+ warn_unreachable = true
103
+
104
+ [[tool.mypy.overrides]]
105
+ # Keep mypy for CI/CD
106
+ module = "tests.*"
107
+ disallow_any_decorated = false # mock.MagicMock is Any
108
+
109
+ [tool.ruff]
110
+ src = [
111
+ "src",
112
+ ]
113
+ target-version = "py310"
114
+
115
+ [tool.ruff.lint]
116
+ select = [
117
+ "ALL",
118
+ ]
119
+ ignore = [
120
+ "C901", # Adding a limit to complexity is too arbitrary
121
+ "COM812", # Avoid conflicts with the formatter
122
+ "D10", # Not everything needs a docstring
123
+ "D203", # Prefer `no-blank-line-before-class` (D211)
124
+ "D213", # Prefer `multi-line-summary-first-line` (D212)
125
+ "PLR09", # Adding a limit to complexity is too arbitrary
126
+ ]
127
+
128
+ [tool.ruff.lint.per-file-ignores]
129
+ "tests/**" = [
130
+ "FBT001", # Test arguments are handled by pytest
131
+ "PLR2004", # Tests should contain magic number comparisons
132
+ "S101", # Pytest needs assert statements
133
+ ]
134
+ "dev_scripts/**" = [
135
+ "INP001",
136
+ ]
137
+
138
+ [tool.ruff.lint.flake8-tidy-imports]
139
+ ban-relative-imports = "all"
140
+
141
+ [tool.ruff.lint.flake8-tidy-imports.banned-api]
142
+ "mock".msg = "Use unittest.mock"
143
+ "pytz".msg = "Use zoneinfo"
144
+
145
+ [tool.ruff.lint.isort]
146
+ combine-as-imports = true
147
+ forced-separate = [
148
+ "tests",
149
+ ]
150
+ split-on-trailing-comma = false
151
+
152
+ [tool.pytest.ini_options]
153
+ minversion = "9.0"
154
+ strict = true
155
+ addopts = ["-ra", "-v"]
156
+ testpaths = [
157
+ "tests",
158
+ "integration",
159
+ ]
160
+
161
+ [tool.coverage.run]
162
+ branch = true
163
+ source = [
164
+ "src/",
165
+ ]
166
+ data_file = ".cov_cache/coverage.dat"
167
+ omit = [
168
+ "src/**/type_defs.py",
169
+ ]
170
+
171
+ [tool.coverage.report]
172
+ exclude_also = [
173
+ "if TYPE_CHECKING:",
174
+ "raise NotImplementedError",
175
+ "raise UnreachableCodeError",
176
+ ]
177
+ fail_under = 100
178
+ precision = 2
179
+ show_missing = true
180
+ skip_covered = true
181
+ skip_empty = true
@@ -0,0 +1,4 @@
1
+ from teritorio.main import Countries, Currencies
2
+
3
+ __all__ = ["Countries", "Currencies"]
4
+ __version__ = "2023.06.16"
@@ -0,0 +1 @@
1
+ __version__ = "2025.11.11"