Locode
Overview
This module contains a series of json files with ISO_3166-1, ISO_3166-2 and city codes from http://www.unece.org/cefact/locode/service/location.html
bdist_egg
python setup.py bdist_egg supports --country=<country_code> for creation
of light weight eggs.
Usage
>>> import locode
>>> locode.get_country_code('United States')
u'US'
>>> locode.get_country_code('Angola')
u'AO'
>>> locode.get_country_code('Uruguay')
u'UY'
>>> locode.get_state_code('Montevideo', 'Uruguay')
u'MO'
>>> locode.get_state_code('Arizona', 'US')
u'AZ'
>>> locode.get_state_code('Saint John', 'AG')
u'04'
>>> locode.get_city_code('New York', 'NY', 'US')
u'NYC'
>>> locode.get_city_code('Punta Carretas', 'Montevideo', 'Uruguay')
u'PCA'
>>> locode.get_city_code('Ondjiva', 'Cunene', 'AO')
u'NGV'
>>> locode.get_city_code('-', '-', '-')
u'XX'
>>> locode.get_state_code('-', '-')
u'XX'
>>> locode.get_country_code('-')
u'XX'
Other methods
locode.get_countries()- returns a map with all countries and its codes.locode.get_states(country)- returns a map with all states and its codes for the provided country.locode.get_cities(country, state)- returns a map witll all cities and its codes for the provided country and state (only for few countries atm)
Metadata
Release files for locode 0.1.1.1
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 |
|---|---|---|---|---|
| locode-0.1.1.1.tar.gz | 920.3 kB | Without provenance | Details for locode-0.1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| locode-0.1.1.1-py3-none-any.whl | Python 3 | none | any | Details for locode-0.1.1.1-py3-none-any.whl |
Total release size: 2.5 MB
Release files / locode-0.1.1.1.tar.gz
| Download URL | locode-0.1.1.1.tar.gz |
|---|---|
| Size | 920.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a0e685fb639d59f0f32b8d4205493919034f41e39b42ea00143041571473b3c
|
|
BLAKE2b-256 checksum How to use checksums |
343e9a870f8461cba49fb0d5ecbb65e12a25fca467c6d42f27b3771eb75a204d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
|
Release files / locode-0.1.1.1-py3-none-any.whl
| Download URL | locode-0.1.1.1-py3-none-any.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22b3224ad7da2ec3e2c0bf06b4136cad78f5c566daca255f3e23f35af07c866a
|
|
BLAKE2b-256 checksum How to use checksums |
44f5524a1c91f73d1d320607bbd4b73b13bad9d5534a6dc3054ce53d6d40261d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
|
Security for locode 0.1.1.1
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.