Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

countrycodes-cli

GitHub PyPI License CI

Command-line interface for the countrycodes ISO 3166-1 lookup library.

Installation

Install as a command-line tool with uv:

uv tool install countrycodes-cli

Or install into the active Python environment:

python -m pip install countrycodes-cli

Requires Python 3.11 or newer. The library dependency is installed automatically.

Usage

Look up a country by code or name:

countrycodes lookup US
countrycodes lookup "United Kingdom"
countrycodes lookup +1

Lookups are displayed as a table by default. Choose JSON output or list all countries:

countrycodes lookup GBR --format json
countrycodes list
countrycodes list --format json

Dial-code lookups display every country or territory sharing that code. In JSON, dial-code lookups return an array; lookups by country name or ISO code return a single record. The default list is rendered as a table sorted by alpha-2 code, with a row number, and JSON list output is an unnumbered array. Country records include the international dial code when available.

See all options with:

countrycodes --help

License

The CLI code is licensed under BSD 3-Clause. The separately distributed countrycodes library includes ISO registry data under LGPL-2.1-or-later and continent assignments from GeoNames under CC BY 4.0; installing the CLI installs that library as a dependency.

Metadata

Release files for countrycodes-cli 0.1.0rc3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for countrycodes-cli 0.1.0rc3
File Size Uploaded Provenance Actions
countrycodes_cli-0.1.0rc3.tar.gz 3.9 kB Without provenance Details for countrycodes_cli-0.1.0rc3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for countrycodes-cli 0.1.0rc3
File Interpreter ABI Platform Actions
countrycodes_cli-0.1.0rc3-py3-none-any.whl Python 3 none any Details for countrycodes_cli-0.1.0rc3-py3-none-any.whl

Total release size: 8.9 kB

Release files / countrycodes_cli-0.1.0rc3.tar.gz

Download URL countrycodes_cli-0.1.0rc3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
38e496d1ef6e07e67c53425e2ae8660450787726e46cf0b5d3816f90a99978f0
BLAKE2b-256 checksum
How to use checksums
11cfcc67916199056e6ea93e2c75a8aa60640992ecd5b3a7daafe6ce7f2e27e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / countrycodes_cli-0.1.0rc3-py3-none-any.whl

Download URL countrycodes_cli-0.1.0rc3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3097ba431663ed70404fc591737dff231f15b2117d3bd5f12ba415be340bf61
BLAKE2b-256 checksum
How to use checksums
675b499c6703bfd0512b29f1368e507804d70eadae2c640770b35699e9886631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for countrycodes-cli 0.1.0rc3

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.

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