countries-dictionary 7.0.0.dev2__tar.gz → 8.0.0.dev1__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.
Files changed (19) hide show
  1. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/PKG-INFO +1 -1
  2. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/pyproject.toml +1 -1
  3. countries_dictionary-8.0.0.dev1/src/countries_dictionary/__init__.py +10 -0
  4. {countries_dictionary-7.0.0.dev2/src/countries_dictionary → countries_dictionary-8.0.0.dev1/src/countries_dictionary/tools}/iso_finder.py +2 -4
  5. {countries_dictionary-7.0.0.dev2/src/countries_dictionary → countries_dictionary-8.0.0.dev1/src/countries_dictionary/tools}/quick_functions.py +6 -7
  6. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary.egg-info/PKG-INFO +1 -1
  7. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary.egg-info/SOURCES.txt +5 -5
  8. countries_dictionary-7.0.0.dev2/src/countries_dictionary/__init__.py +0 -10
  9. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/LICENCE +0 -0
  10. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/README.md +0 -0
  11. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/setup.cfg +0 -0
  12. /countries_dictionary-7.0.0.dev2/src/countries_dictionary/main_countries.py → /countries_dictionary-8.0.0.dev1/src/countries_dictionary/countries.py +0 -0
  13. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary/russia.py +0 -0
  14. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary/united_states.py +0 -0
  15. /countries_dictionary-7.0.0.dev2/src/countries_dictionary/unrecognised_states/unrecognised.py → /countries_dictionary-8.0.0.dev1/src/countries_dictionary/unrecognised_states/__init__.py +0 -0
  16. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary/unrecognised_states/transnistria.py +0 -0
  17. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary/vietnam.py +0 -0
  18. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary.egg-info/dependency_links.txt +0 -0
  19. {countries_dictionary-7.0.0.dev2 → countries_dictionary-8.0.0.dev1}/src/countries_dictionary.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: countries_dictionary
3
- Version: 7.0.0.dev2
3
+ Version: 8.0.0.dev1
4
4
  Summary: Provides dictionaries contains countries and unrecognised states and information about them
5
5
  Author-email: Ngô Trần Quang Thiện <quangthienngotran@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "countries_dictionary"
7
- version = "7.0.0.dev2"
7
+ version = "8.0.0.dev1"
8
8
  description = "Provides dictionaries contains countries and unrecognised states and information about them"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
@@ -0,0 +1,10 @@
1
+ from countries_dictionary.countries import COUNTRIES
2
+ from countries_dictionary.russia import RUSSIA
3
+ from countries_dictionary.united_states import UNITED_STATES
4
+ from countries_dictionary.vietnam import VIETNAM
5
+
6
+ from countries_dictionary.unrecognised_states import UNRECOGNISED_STATES
7
+ from countries_dictionary.unrecognised_states.transnistria import TRANSNISTRIA
8
+
9
+ from countries_dictionary.tools.quick_functions import quick_function, json_dictionary, sort_dictionary
10
+ from countries_dictionary.tools.iso_finder import iso_finder, iso_ru_finder, iso_us_finder, iso_vn_finder
@@ -1,7 +1,5 @@
1
- from countries_dictionary.quick_functions import quick_function
2
- from countries_dictionary.russia import RUSSIA
3
- from countries_dictionary.united_states import UNITED_STATES
4
- from countries_dictionary.vietnam import VIETNAM
1
+ from countries_dictionary import quick_function
2
+ from countries_dictionary import RUSSIA, UNITED_STATES, VIETNAM
5
3
 
6
4
  countries = quick_function(addition="ISO 3166-2")
7
5
 
@@ -1,7 +1,4 @@
1
- from countries_dictionary import COUNTRIES
2
- from countries_dictionary.russia import RUSSIA
3
- from countries_dictionary.united_states import UNITED_STATES
4
- from countries_dictionary.vietnam import VIETNAM
1
+ from countries_dictionary import COUNTRIES, RUSSIA, UNITED_STATES, VIETNAM, UNRECOGNISED_STATES, TRANSNISTRIA
5
2
 
6
3
  from json import dumps
7
4
  from copy import deepcopy
@@ -13,17 +10,19 @@ def quick_function(dictionary: str = "countries", addition: str = ""):
13
10
  case "russia": thanhbinh = deepcopy(RUSSIA)
14
11
  case "united states" | "america": thanhbinh = deepcopy(UNITED_STATES)
15
12
  case "vietnam": thanhbinh = deepcopy(VIETNAM)
13
+ case "unrecognised_states" | "unrecognized_states" | "unrecognised" | "unrecognized": thanhbinh = deepcopy(UNRECOGNISED_STATES)
14
+ case "transnistria" | "pridnestrovie": thanhbinh = deepcopy(TRANSNISTRIA)
16
15
  case _: raise Exception("This dictionary does not exist (yet)")
17
16
  match addition.casefold():
18
17
  case "population density":
19
- if dictionary.casefold() == "countries":
18
+ if dictionary.casefold() in ("countries", "unrecognised_states", "unrecognized_states", "unrecognised", "unrecognized"):
20
19
  for x in thanhbinh: thanhbinh[x]["population density"] = thanhbinh[x]["population"] / thanhbinh[x]["land area"]
21
20
  else:
22
21
  for x in thanhbinh: thanhbinh[x]["population density"] = thanhbinh[x]["population"] / thanhbinh[x]["area"]
23
22
  case "gdp per capita":
24
- if dictionary.casefold() == "countries":
23
+ if dictionary.casefold() in ("countries", "unrecognised_states", "unrecognized_states", "unrecognised", "unrecognized"):
25
24
  for x in thanhbinh: thanhbinh[x]["GDP per capita"] = thanhbinh[x]["nominal GDP"] / thanhbinh[x]["population"]
26
- else: raise Exception("Only works with the Countries dictionary")
25
+ else: raise Exception("Only works with the Countries and Unrecognised states dictionary")
27
26
  case "iso 3166-2":
28
27
  if dictionary.casefold() == "countries":
29
28
  for x in thanhbinh: thanhbinh[x]["ISO 3166-2"] = "ISO 3166-2:" + thanhbinh[x]["ISO 3166-1"]["alpha-2"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: countries_dictionary
3
- Version: 7.0.0.dev2
3
+ Version: 8.0.0.dev1
4
4
  Summary: Provides dictionaries contains countries and unrecognised states and information about them
5
5
  Author-email: Ngô Trần Quang Thiện <quangthienngotran@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -2,9 +2,7 @@ LICENCE
2
2
  README.md
3
3
  pyproject.toml
4
4
  src/countries_dictionary/__init__.py
5
- src/countries_dictionary/iso_finder.py
6
- src/countries_dictionary/main_countries.py
7
- src/countries_dictionary/quick_functions.py
5
+ src/countries_dictionary/countries.py
8
6
  src/countries_dictionary/russia.py
9
7
  src/countries_dictionary/united_states.py
10
8
  src/countries_dictionary/vietnam.py
@@ -12,5 +10,7 @@ src/countries_dictionary.egg-info/PKG-INFO
12
10
  src/countries_dictionary.egg-info/SOURCES.txt
13
11
  src/countries_dictionary.egg-info/dependency_links.txt
14
12
  src/countries_dictionary.egg-info/top_level.txt
15
- src/countries_dictionary/unrecognised_states/transnistria.py
16
- src/countries_dictionary/unrecognised_states/unrecognised.py
13
+ src/countries_dictionary/tools/iso_finder.py
14
+ src/countries_dictionary/tools/quick_functions.py
15
+ src/countries_dictionary/unrecognised_states/__init__.py
16
+ src/countries_dictionary/unrecognised_states/transnistria.py
@@ -1,10 +0,0 @@
1
- from countries_dictionary.main_countries import COUNTRIES
2
- from countries_dictionary.russia import RUSSIA
3
- from countries_dictionary.united_states import UNITED_STATES
4
- from countries_dictionary.vietnam import VIETNAM
5
-
6
- from countries_dictionary.quick_functions import quick_function, json_dictionary, sort_dictionary
7
- from countries_dictionary.iso_finder import iso_finder, iso_ru_finder, iso_us_finder, iso_vn_finder
8
-
9
- from countries_dictionary.unrecognised_states.unrecognised import UNRECOGNISED_STATES
10
- from countries_dictionary.unrecognised_states.transnistria import TRANSNISTRIA