This package helps turning two or three letter codes into short English names.
shortcountrynames is maintained by Robert Gieseke (rob.g@web.de).
CSV file
CSV file, with two and three-letter country codes and short English country names based on the country-codes Data Package with some changes and additions to the choice of short names.
Python module
Install with
pip install shortcountrynames
Usage
from shortcountrynames import to_name
assert to_name("DE") == "Germany"
assert to_name("DEU") == "Germany"
JavaScript module
Install with
npm install shortcountrynames
Usage
import {names, to_name} from 'shortcountrynames'
// Define custom codes
names["FOO"] = 'Foo'
console.log(to_name("DEU")) // Germany
console.log(to_name("FOO")) // Foo
Notes
Non-standard codes:
EU, EUU - European Union
XK, XKX - Kosovo
Releasing
Run make update-version to update the Python and Node version and create a new tag.
Push to GitHub with
git push origin main --tags
License
CC0
Metadata
Release files for shortcountrynames 0.18.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 |
|---|---|---|---|---|
| shortcountrynames-0.18.0.tar.gz | 8.3 kB | Without provenance | Details for shortcountrynames-0.18.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shortcountrynames-0.18.0-py3-none-any.whl | Python 3 | none | any | Details for shortcountrynames-0.18.0-py3-none-any.whl |
Total release size: 16.8 kB
Release files / shortcountrynames-0.18.0.tar.gz
| Download URL | shortcountrynames-0.18.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c95251ad85276279d58a299dc3bfce3238cc55d76037ec42bb944751a2af18b8
|
|
BLAKE2b-256 checksum How to use checksums |
f9cc67f59e31376fc3d40f5873d9031ab41a5b271c069135a23e18c26c05952b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / shortcountrynames-0.18.0-py3-none-any.whl
| Download URL | shortcountrynames-0.18.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
239897b7dcb0985b33d036ed4a1d4265e7d8cedde57104a979721c64b00e008b
|
|
BLAKE2b-256 checksum How to use checksums |
8de2d3a98b10438a2789e03e4ac5a59a16ef0a8315600803ec4291b75d2349f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for shortcountrynames 0.18.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.