countries-dictionary 3.1.3__py3-none-any.whl → 4.0.0__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,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: countries_dictionary
3
- Version: 3.1.3
4
- Summary: Provides a dictionary contains all members and observer states of the United Nations and information about them
3
+ Version: 4.0.0
4
+ Summary: Provides a dictionary 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
7
7
  Version 3, 29 June 2007
@@ -679,58 +679,31 @@ License: GNU GENERAL PUBLIC LICENSE
679
679
  <https://www.gnu.org/licenses/why-not-lgpl.html>.
680
680
  Project-URL: Homepage, https://github.com/ThienFakeVN/countries_dictionary/
681
681
  Project-URL: Repository, https://github.com/ThienFakeVN/countries_dictionary/
682
- Keywords: countries,dictionary,united nations,states,russia,united states,vietnam,iso
682
+ Keywords: countries,states,dictionary,united nations,russia,united states,vietnam,iso
683
683
  Requires-Python: >=3.7
684
684
  Description-Content-Type: text/markdown
685
685
  License-File: LICENCE
686
686
  Dynamic: license-file
687
687
 
688
688
  # Countries Dictionary
689
- Countries Dictionary provides:
690
- - A dictionary contains all members and observer states of the United Nations and information about them:
691
- - Formal name
692
- - Continent(s) of the country's mainland
693
- - Area and land area (in square kilometre)
694
- - Population
695
- - Official language(s)
696
- - Nominal GDP (in dollar)
697
- - Human Development Index
698
- - ISO 3166-1 codes
699
- - Another dictionary contains all federal subjects of the Russian Federation (including occupied zones in Ukraine) and information about them:
700
- - Federal district
701
- - Economic region
702
- - Capital or administrative centre
703
- - Area (in square kilometre)
704
- - Population
705
- - Another one contains all provinces and municipalities of the Socialist Republic of Vietnam and information about them:
706
- - Region
707
- - Administrative centre
708
- - Area (in square kilometre)
709
- - Population
710
- - Another one contains all states, federal district and inhabited territories of the United Nations and information about them:
711
- - Capital
712
- - Date of ratification/establishment/acquiring
713
- - Area (in square kilometre)
714
- - Population
715
- - House Representatives
716
- - Postal code
717
- - Some functions which you might find helpful
689
+ Countries Dictionary is a data-oriented module which provides dictionaries of countries and states, from members of UN to unrecognised ones.
718
690
 
719
691
  I created this module as an offline source of countries' information which is easy to access and use by coders.
720
692
 
721
693
  See [CHANGELOG.md](https://github.com/ThienFakeVN/countries_dictionary/blob/main/CHANGELOG.md) for changes of releases.
722
694
 
723
- Before using, it is recommended to see the code on [GitHub](https://github.com/ThienFakeVN/countries_dictionary/) or the below section to understand how the module works and how you can use it
724
-
695
+ Before using, it is recommended to see the code on [GitHub](https://github.com/ThienFakeVN/countries_dictionary/) <!--or the below section--> to understand how the module works and how you can use it.
696
+ <!--
725
697
  ## Codes
726
698
  ### Main Countries Dictionary
727
- #### Structure
728
699
  The Countries Dictionary has a structure like this:
729
700
  ```python
730
701
  COUNTRIES = {
731
702
  "Afghanistan": {
732
703
  "formal name": "Islamic Emirate of Afghanistan",
704
+ "motto": "There is no god but God; Muhammad is the messenger of God",
733
705
  "continents": ["Asia"],
706
+ "landlocked": True,
734
707
  "area": 652864.0,
735
708
  "land area": 652230.0,
736
709
  "population": 42045000,
@@ -743,115 +716,58 @@ COUNTRIES = {
743
716
  }
744
717
  ```
745
718
 
746
- #### Usage example
747
- ```python
748
- from countries_dictionary import COUNTRIES # Remember to import the module!
749
-
750
- # Prints the formal name of the country
751
- print(COUNTRIES["Vietnam"]["formal name"])
752
-
753
- # Compares the population of two countries
754
- print(COUNTRIES["North Korea"]["population"] > COUNTRIES["South Korea"]["population"])
755
- print(COUNTRIES["North Korea"]["population"] == COUNTRIES["South Korea"]["population"])
756
- print(COUNTRIES["North Korea"]["population"] < COUNTRIES["South Korea"]["population"])
757
-
758
- # Creates the list of all countries
759
- list_of_countries = list(COUNTRIES.keys())
760
- print(list_of_countries)
761
- ```
762
-
763
719
  ### Russia dictionary
764
- #### Structure
765
720
  The Russia dictionary has a structure like this:
766
721
  ```python
767
722
  RUSSIA = {
768
723
  "Adygea": {
769
724
  "federal district": "Southern",
770
725
  "economic region": "North Caucasus",
726
+ "landlocked": True,
771
727
  "capital/administrative centre": "Maykop",
772
728
  "area": 7792.0,
773
- "population": 501038},
729
+ "population": 501038,
730
+ "ISO 3166-2:RU": "RU-AD",
731
+ },
774
732
  # ...
775
733
  }
776
734
  ```
777
735
 
778
- #### Usage example
779
- ```python
780
- from countries_dictionary.russia import RUSSIA # Remember to import the module
781
-
782
- # Prints the administrative centre of a krai
783
- print(RUSSIA["Primorsky Krai"]["capital/administrative centre"])
784
-
785
- # Sees if the two federal subjects are in the same federal district
786
- print(RUSSIA["Tuva"]["federal district"] == RUSSIA["Altai Republic"]["federal district"])
787
-
788
- # Creates the list of all federal subjects
789
- list_of_federal_subjects = list(RUSSIA.keys())
790
- print(list_of_federal_subjects)
791
- ```
792
-
793
736
  ### United States dictionary
794
- #### Structure
795
737
  The United States dictionary has a structure like this:
796
738
  ```python
797
739
  UNITED_STATES = {
798
740
  "Alabama": {
799
741
  "capital": "Montgomery",
800
742
  "date of ratification/establishment/acquiring": "1819.12.14",
743
+ "landlocked": False,
801
744
  "area": 135767.0,
802
745
  "population": 5024279,
803
746
  "House Representatives": 7,
804
- "postal code": "AL",
805
- }
747
+ "ISO 3166-2:US": "US-AL",
748
+ },
806
749
  # ...
807
750
  }
808
751
  ```
809
752
 
810
- #### Usage example
811
- ```python
812
- from countries_dictionary.united_states import UNITED_STATES # Remember to import the module...
813
-
814
- # Prints the postal code of a state
815
- print(UNITED_STATES["Ohio"]["postal code"])
816
-
817
- # Compares the numbers of House Representatives of two states
818
- print(UNITED_STATES["Oklahoma"]["House Representatives"] > UNITED_STATES["Connecticut"]["House Representatives"])
819
- print(UNITED_STATES["Oklahoma"]["House Representatives"] == UNITED_STATES["Connecticut"]["House Representatives"])
820
- print(UNITED_STATES["Oklahoma"]["House Representatives"] < UNITED_STATES["Connecticut"]["House Representatives"])
821
-
822
- # Creates the list of all states
823
- list_of_states = list(UNITED_STATES.keys())
824
- print(list_of_states)
825
- ```
826
-
827
753
  ### Vietnam dictionary
828
- #### Structure
829
754
  The Vietnam dictionary has a structure like this:
830
755
  ```python
831
756
  VIETNAM = {
832
757
  "Hanoi": {
833
758
  "region": "Red River Delta",
759
+ "landlocked": True,
834
760
  "administrative centre": "Hoàn Kiếm ward",
835
761
  "area": 3359.84,
836
- "population": 8807523},
762
+ "population": 8807523,
763
+ "ISO 3166-2:VN": "VN-HN",
764
+ },
837
765
  # ...
838
766
  }
839
767
  ```
840
768
 
841
- #### Usage example
842
- ```python
843
- from countries_dictionary.vietnam import VIETNAM # Of course...
844
-
845
- # Prints the population of a province
846
- print(VIETNAM["Ho Chi Minh City"]["population"])
847
-
848
- # Sees if the two provinces are in the same region
849
- print(VIETNAM["Nghệ An province"]["region"] == VIETNAM["Hà Tĩnh province"]["region"])
850
-
851
- # Creates the list of all provinces
852
- list_of_provinces = list(VIETNAM.keys())
853
- print(list_of_provinces)
854
- ```
769
+ ### Countries Languages
770
+ Unused, as of now...
855
771
 
856
772
  ### Quick functions
857
773
  There are many functions in this submodule.
@@ -870,9 +786,46 @@ print(iso["Russia"]["ISO 3166-2"])
870
786
  ### ISO finder
871
787
  *ISO finder* is a module which provides a function which has the same name. *ISO finder* can find a country based on the provided ISO code. Note that it does not include US states' postal codes.
872
788
  ```python
873
- from countries_dictionary.iso_finder import iso_finder
789
+ from countries_dictionary.iso_finder import iso_finder # 🥀
874
790
 
875
791
  print(iso_finder("VN"))
876
792
  print(iso_finder("RUS"))
877
793
  print(iso_finder("840"))
878
794
  ```
795
+
796
+ ### Unrecognised states
797
+ The unrecognised states Dictionary has a structure like this:
798
+
799
+ ```python
800
+ UNRECOGNISED_STATES = {
801
+ "Cook Islands": {
802
+ "formal name": "Cook Islands",
803
+ "motto": "",
804
+ "continents": ["Oceania"],
805
+ "landlocked": False,
806
+ "area": 236.0,
807
+ "land area": 236.0,
808
+ "population": 15040,
809
+ "official languages": ["English", "Cook Islands Māori", "Pukapukan"],
810
+ "nominal GDP": 384000000,
811
+ "HDI": 0,
812
+ "ISO 3166-1": {"alpha-2": "CK", "alpha-3": "COK", "numeric": "184"},
813
+ },
814
+ # ...
815
+ # Additional information may be added as comments in the codes
816
+ }
817
+ ```
818
+
819
+ ### Transnistria
820
+ The Transnistria Dictionary has a structure like this:
821
+ ```python
822
+ TRANSNISTRIA = {
823
+ "Camenca": {
824
+ "administrative centre": "Camenca",
825
+ "area": 434.5,
826
+ "population": 21000,
827
+ },
828
+ # ...
829
+ }
830
+ ```
831
+ -->
@@ -0,0 +1,13 @@
1
+ countries_dictionary/__init__.py,sha256=47-vHleZFYc96ARK9GTKFYy9tig1xAqQ8d1KKpK0dHU,91712
2
+ countries_dictionary/iso_finder.py,sha256=pXdRTzkqrU0Z_Jsq0T0fketKSMP1ZqaUykxBMRHvQ40,2087
3
+ countries_dictionary/quick_functions.py,sha256=Sp7Z7GGTfjMiV5Fbyeg987XrR2TWEnXaEysAM5UWQVI,4960
4
+ countries_dictionary/russia.py,sha256=tHz13QtAy6ZVJxawsak-8BFi_J4VCJEpa7S10UzVSwg,26518
5
+ countries_dictionary/united_states.py,sha256=FOP7SR02qU52a1yAW4CaUgPWiOg6mzMM6ybPMSHEbeo,16782
6
+ countries_dictionary/vietnam.py,sha256=SXvO9ZNkoebYOkziQotzs7htCnh8Kx6eaqE7P592lU8,8920
7
+ countries_dictionary/unrecognised_states/__init__.py,sha256=gT-JvSNNNom13-gbO0_LtvJXHRJKcLXtjaQfYt9K6co,5025
8
+ countries_dictionary/unrecognised_states/transnistria.py,sha256=Sznh31EfYO5bgBKa1z73ikMflygK0GJzCrJyg881QYQ,1015
9
+ countries_dictionary-4.0.0.dist-info/licenses/LICENCE,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
10
+ countries_dictionary-4.0.0.dist-info/METADATA,sha256=pPORsX5-s2J2Dldf6TRcBZve0ixbXbVVyxEVywfjsrE,46090
11
+ countries_dictionary-4.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ countries_dictionary-4.0.0.dist-info/top_level.txt,sha256=7tkD6sfiOQ__y-Eb2rnPUU0Lbhr_wtFBNcRus-aU4Zw,21
13
+ countries_dictionary-4.0.0.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- countries_dictionary/__init__.py,sha256=9TqDxIxHiX1mhXSdeltXUMfKVXYA5ee3cuLurl988MY,78042
2
- countries_dictionary/iso_finder.py,sha256=PB9lbeVUWi_kY5Z3ABTGVF1npndsSAHvmO82Ou8N4Yk,668
3
- countries_dictionary/quick_functions.py,sha256=Ok62u2R88NubIrMtNSiHHzZ29orx_GYdrDmiSycAHyI,4477
4
- countries_dictionary/russia.py,sha256=3tmknQM_51PHmsF6TI6arFdjwPhWBEPHPiKP7PzXBmI,20119
5
- countries_dictionary/united_states.py,sha256=WJs5OrMMXinLPJWzt42hHPt89OLUC4qgifDUB9OrvoQ,15035
6
- countries_dictionary/vietnam.py,sha256=zRdwasxzwMJNbkNInljXzEu2gA9TDEI5F8cIM4TmBtg,6446
7
- countries_dictionary-3.1.3.dist-info/licenses/LICENCE,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
8
- countries_dictionary-3.1.3.dist-info/METADATA,sha256=vmnFaBahawntH1wgQiNyLUyW4toluRUZZm7cRlnFJ58,48306
9
- countries_dictionary-3.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- countries_dictionary-3.1.3.dist-info/top_level.txt,sha256=7tkD6sfiOQ__y-Eb2rnPUU0Lbhr_wtFBNcRus-aU4Zw,21
11
- countries_dictionary-3.1.3.dist-info/RECORD,,