countries-dictionary 2.3.0__tar.gz → 2.3.1__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.
Potentially problematic release.
This version of countries-dictionary might be problematic. Click here for more details.
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/PKG-INFO +2 -1
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/README.md +1 -0
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary/__init__.py +1 -1
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary/quick_variables.py +20 -20
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary/russia.py +1 -1
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary/vietnam.py +1 -1
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary.egg-info/PKG-INFO +2 -1
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/pyproject.toml +1 -1
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/LICENCE +0 -0
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary.egg-info/SOURCES.txt +0 -0
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary.egg-info/dependency_links.txt +0 -0
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary.egg-info/top_level.txt +0 -0
- {countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: countries_dictionary
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: Provides a dictionary contains all members and observer states of the United Nations and information about them
|
|
5
5
|
Author-email: Ngô Trần Quang Thiện <quangthienngotran@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -685,6 +685,7 @@ Description-Content-Type: text/markdown
|
|
|
685
685
|
License-File: LICENCE
|
|
686
686
|
Dynamic: license-file
|
|
687
687
|
|
|
688
|
+
# Countries Dictionary
|
|
688
689
|
Countries Dictionary provides:
|
|
689
690
|
- A dictionary contains all members and observer states of the United Nations and information about them:
|
|
690
691
|
- Formal name
|
{countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary/quick_variables.py
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"""Some prepared functions which might or might not be helpful"""
|
|
2
2
|
|
|
3
|
-
from countries_dictionary import
|
|
4
|
-
from countries_dictionary.russia import
|
|
5
|
-
from countries_dictionary.vietnam import
|
|
3
|
+
from countries_dictionary import COUNTRIES
|
|
4
|
+
from countries_dictionary.russia import RUSSIA
|
|
5
|
+
from countries_dictionary.vietnam import VIETNAM
|
|
6
6
|
import json
|
|
7
7
|
|
|
8
8
|
def chosen_dictionary(dictionary="countries"):
|
|
9
9
|
"""Returns one of the dictionaries depends on the parameter. Used in other functions"""
|
|
10
|
-
if dictionary.casefold() == "countries": return
|
|
11
|
-
elif dictionary.casefold() == "russia": return
|
|
12
|
-
elif dictionary.casefold() == "vietnam": return
|
|
10
|
+
if dictionary.casefold() == "countries": return COUNTRIES
|
|
11
|
+
elif dictionary.casefold() == "russia": return RUSSIA
|
|
12
|
+
elif dictionary.casefold() == "vietnam": return VIETNAM
|
|
13
13
|
else: raise Exception("This dictionary does not exist (yet)")
|
|
14
14
|
|
|
15
15
|
def json_dictionary(indent: int | str | None = None, dictionary="countries"):
|
|
@@ -31,37 +31,37 @@ def filtered_dictionary(chosen_key: str, chosen_value: int | str, dictionary="co
|
|
|
31
31
|
# This is still under development
|
|
32
32
|
|
|
33
33
|
def countries_population_density():
|
|
34
|
-
"""Returns the countries dictionary with the `
|
|
34
|
+
"""Returns the countries dictionary with the `population density` key included in the countries' keys
|
|
35
35
|
- Population density (in people per square kilometre) = Population / Land area"""
|
|
36
|
-
new_countries =
|
|
37
|
-
for x in
|
|
36
|
+
new_countries = COUNTRIES
|
|
37
|
+
for x in COUNTRIES: new_countries[x]["population density"] = COUNTRIES[x]["population"] / COUNTRIES[x]["land area"]
|
|
38
38
|
return new_countries
|
|
39
39
|
|
|
40
40
|
def russia_population_density():
|
|
41
|
-
"""Returns the Russia dictionary with the `
|
|
41
|
+
"""Returns the Russia dictionary with the `population density` key included in the countries' keys
|
|
42
42
|
- Population density (in people per square kilometre) = Population / Land area"""
|
|
43
|
-
new_russia =
|
|
44
|
-
for x in
|
|
43
|
+
new_russia = RUSSIA
|
|
44
|
+
for x in RUSSIA: new_russia[x]["population density"] = RUSSIA[x]["population"] / RUSSIA[x]["area"]
|
|
45
45
|
return new_russia
|
|
46
46
|
|
|
47
47
|
def vietnam_population_density():
|
|
48
|
-
"""Returns the Vietnam dictionary with the `
|
|
48
|
+
"""Returns the Vietnam dictionary with the `population density` key included in the countries' keys
|
|
49
49
|
- Population density (in people per square kilometre) = Population / Area"""
|
|
50
|
-
new_vietnam =
|
|
51
|
-
for x in
|
|
50
|
+
new_vietnam = VIETNAM
|
|
51
|
+
for x in VIETNAM: new_vietnam[x]["population density"] = VIETNAM[x]["population"] / VIETNAM[x]["area"]
|
|
52
52
|
return new_vietnam
|
|
53
53
|
|
|
54
54
|
def countries_population_density():
|
|
55
|
-
"""Returns the countries dictionary with the `
|
|
55
|
+
"""Returns the countries dictionary with the `GDP per capita` key included in the countries' keys
|
|
56
56
|
- GDP per capita (in dollars per person) = Nominal GDP / Population"""
|
|
57
|
-
new_countries =
|
|
58
|
-
for x in
|
|
57
|
+
new_countries = COUNTRIES
|
|
58
|
+
for x in COUNTRIES: new_countries[x]["GDP per capita"] = COUNTRIES[x]["nominal GDP"] / COUNTRIES[x]["population"]
|
|
59
59
|
return new_countries
|
|
60
60
|
|
|
61
61
|
def countries_france_censored():
|
|
62
|
-
"""Returns the countries dictionary with the `
|
|
62
|
+
"""Returns the countries dictionary with the `France` key gets censored `Fr*nce`
|
|
63
63
|
(This is only a joke, I don't support hate against France and French people)"""
|
|
64
|
-
new_countries =
|
|
64
|
+
new_countries = COUNTRIES
|
|
65
65
|
new_countries["Fr*nce"] = new_countries.pop("France")
|
|
66
66
|
new_countries = dict(sorted(new_countries.items()))
|
|
67
67
|
return new_countries
|
{countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: countries_dictionary
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: Provides a dictionary contains all members and observer states of the United Nations and information about them
|
|
5
5
|
Author-email: Ngô Trần Quang Thiện <quangthienngotran@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -685,6 +685,7 @@ Description-Content-Type: text/markdown
|
|
|
685
685
|
License-File: LICENCE
|
|
686
686
|
Dynamic: license-file
|
|
687
687
|
|
|
688
|
+
# Countries Dictionary
|
|
688
689
|
Countries Dictionary provides:
|
|
689
690
|
- A dictionary contains all members and observer states of the United Nations and information about them:
|
|
690
691
|
- Formal name
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "countries_dictionary"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.1"
|
|
8
8
|
description = "Provides a dictionary contains all members and observer states of the United Nations and information about them"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.7"
|
|
File without changes
|
{countries_dictionary-2.3.0 → countries_dictionary-2.3.1}/countries_dictionary.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|