Skip to main content

PyPI npm

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

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)

Source distribution for shortcountrynames 0.18.0
File Size Uploaded
shortcountrynames-0.18.0.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shortcountrynames 0.18.0
File Interpreter ABI Platform
shortcountrynames-0.18.0-py3-none-any.whl Python 3 none any Details

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}

Release history Release notifications | RSS feed

This release

0.18.0 This release

2 release files

0.15.0

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.0

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page