countries-dictionary 2.3.0__py3-none-any.whl → 2.3.1__py3-none-any.whl

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.

@@ -1,4 +1,4 @@
1
- countries = {
1
+ COUNTRIES = {
2
2
  # A
3
3
  "Afghanistan": {
4
4
  "formal name": "Islamic Emirate of Afghanistan",
@@ -1,15 +1,15 @@
1
1
  """Some prepared functions which might or might not be helpful"""
2
2
 
3
- from countries_dictionary import countries
4
- from countries_dictionary.russia import russia
5
- from countries_dictionary.vietnam import vietnam
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 countries
11
- elif dictionary.casefold() == "russia": return russia
12
- elif dictionary.casefold() == "vietnam": return vietnam
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 `"population density"` key included in the countries' keys
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 = countries
37
- for x in countries: new_countries[x]["population density"] = countries[x]["population"] / countries[x]["land area"]
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 `"population density"` key included in the countries' keys
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 = russia
44
- for x in russia: new_russia[x]["population density"] = russia[x]["population"] / russia[x]["area"]
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 `"population density"` key included in the countries' keys
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 = vietnam
51
- for x in vietnam: new_vietnam[x]["population density"] = vietnam[x]["population"] / vietnam[x]["area"]
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 `"GDP per capita"` key included in the countries' keys
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 = countries
58
- for x in countries: new_countries[x]["GDP per capita"] = countries[x]["nominal GDP"] / countries[x]["population"]
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 `"France"` key gets censored `"Fr*nce"`
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 = 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
@@ -1,4 +1,4 @@
1
- russia = {
1
+ RUSSIA = {
2
2
  "Adygea": {
3
3
  "federal district": "Southern",
4
4
  "economic region": "North Caucasus",
@@ -1,4 +1,4 @@
1
- vietnam = {
1
+ VIETNAM = {
2
2
  "Hanoi": {
3
3
  "region": "Red River Delta",
4
4
  "administrative centre": "Hoàn Kiếm ward",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: countries_dictionary
3
- Version: 2.3.0
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
@@ -0,0 +1,9 @@
1
+ countries_dictionary/__init__.py,sha256=dKpCNwlvJUzg2f8v3xhFt_ZwbWN4GST8HSPPAnOyi8Y,62813
2
+ countries_dictionary/quick_variables.py,sha256=-z72AFyLCdvBfdeHsJnlJIfij3VjrKFc3Mbq-5_LvGg,3538
3
+ countries_dictionary/russia.py,sha256=qfj4NimvUNBvAanm6ijLYhzFdAELh6ALxUUyGeG6NqE,20097
4
+ countries_dictionary/vietnam.py,sha256=oh8TDpIvfzezFz3fs9xP56ZeMrsCeFNFSyWGh4BCvQQ,6424
5
+ countries_dictionary-2.3.1.dist-info/licenses/LICENCE,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
6
+ countries_dictionary-2.3.1.dist-info/METADATA,sha256=487kkFMkw4oGdYuPY9va1ehuFIHtddq65kEMfvbg8GI,42915
7
+ countries_dictionary-2.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ countries_dictionary-2.3.1.dist-info/top_level.txt,sha256=7tkD6sfiOQ__y-Eb2rnPUU0Lbhr_wtFBNcRus-aU4Zw,21
9
+ countries_dictionary-2.3.1.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- countries_dictionary/__init__.py,sha256=NXYVcOhGJ0Jza3jTvgykUvAX38L75KVxxffwY-2obsU,62813
2
- countries_dictionary/quick_variables.py,sha256=No05p1EbmHSOgbU6-FZhgNq21GJ8--k6UaHSvPgNdJo,3550
3
- countries_dictionary/russia.py,sha256=iHm3n54urJtKnzXfWGuTD-4vf23hH2ysKCIV0LTmF6g,20097
4
- countries_dictionary/vietnam.py,sha256=6aaV7QPhEHDFvPXPVJBr95wYHsJacC_Hr587_PnVdlE,6424
5
- countries_dictionary-2.3.0.dist-info/licenses/LICENCE,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
6
- countries_dictionary-2.3.0.dist-info/METADATA,sha256=egZq2TzW3jMCNSa-1nGzP5gfRcCgWx1zSGW159pqSWo,42891
7
- countries_dictionary-2.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- countries_dictionary-2.3.0.dist-info/top_level.txt,sha256=7tkD6sfiOQ__y-Eb2rnPUU0Lbhr_wtFBNcRus-aU4Zw,21
9
- countries_dictionary-2.3.0.dist-info/RECORD,,