CountryPy
Description
CountryPy is a lightweight & efficient modern country data library, used for fetching information about a variety of countries with support for command-line interface (CLI).
Installation
Python 3.6+ is required
# MacOS / Linux (via Terminal)
python3 -m pip install -U countrypy
# Windows (via CMD Prompt)
py -3 -m pip install -U countrypy
Quick Start
>>> from countrypy import Country
>>> country = Country("United States of America")
>>> print(f"Capital: {country.capital}")
'Washington, D.C'
Search
>>> from countrypy import Search
>>> searching = Search(Search.timezones, "UTC-12:00")
>>> print(searching)
'United States'
CLI Quick Start
$ countrypy quickinfo US
Take a look at more examples in the examples folder!
v1.1.0 Changes
v1.1.0
- [ADDED] Added
Searchoption &search_byfor CLI - you can now sort countries by data such as timezones & languages! - [ADDED] Added more error handling
- [MODIFIED] Changed API URL to use filters to reduce load time
- [PATCH] Fixed a bug for both CLI and non-cli with phone country codes and their suffixes
Want to contribute?
Take a look at the contributing guidelines!
© Arjun Sharda 2024-present
All Rights Reserved
Metadata
Release files for countrypy 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| countrypy-1.1.0.tar.gz | 11.2 kB | Without provenance | Details for countrypy-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| countrypy-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for countrypy-1.1.0-py3-none-any.whl |
Total release size: 22.7 kB
Release files / countrypy-1.1.0.tar.gz
| Download URL | countrypy-1.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0136ba116b678165a9d30fc91a0678ba7a0b5791473e4fc71eb89e6c9b26b61f
|
|
BLAKE2b-256 checksum How to use checksums |
8a6875c94274baf28ddd302e9e8290d3d1b9dcc10cbcdf3b930b2dbda4d2219f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / countrypy-1.1.0-py3-none-any.whl
| Download URL | countrypy-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f0f703f06c758f2c03e123384b2420dd8f1b5f9cd5e1f1e2aa268f6128656f1
|
|
BLAKE2b-256 checksum How to use checksums |
4d2ac3354913b43bd9c4113490b9aff4b74ef358f8963fbec2d27ae26311522f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for countrypy 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.