Skip to main content

Jinja2 filter to look up country codes using the GOV.UK country and territory registers

Project description

govuk-country-register

Jijna2 filter that uses GOV.UK Registers to look up country codes.

The register data is included in the package so no external requests are required. This package will be updated when new register data is released.

Usage

import jinja2

from govuk_country_register import to_country

to_country("UK")  # "United Kingdom"

jinja_env = jinja2.Environment()
jinja_env.filters["to_country"] = to_country

Version History

2019-08-16 version 0.5.0

  • Update country data

2019-06-06 version 0.4.0

  • Refactor code to load CSVs from a Python package

2019-06-06 version 0.3.1

  • Fix bug where unicode characters would cause issues on systems with the default locale

2019-03-14 version 0.3.0

  • Update country data

2019-02-12 version 0.2.2

  • Fix PyPI readme

2019-02-12 version 0.2.1

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

govuk-country-register-0.5.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

govuk_country_register-0.5.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file govuk-country-register-0.5.0.tar.gz.

File metadata

  • Download URL: govuk-country-register-0.5.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for govuk-country-register-0.5.0.tar.gz
Algorithm Hash digest
SHA256 45bf75570e91e8df7ed023cc17d9b7a54e4dacccd60cc2d15cc617e5ddd8aa69
MD5 4a0fb13c9b5954c97e10f5691eef2f53
BLAKE2b-256 ba0281721993d8f489117e593f7f8ee9612365de7cad03fc469441b17e996132

See more details on using hashes here.

File details

Details for the file govuk_country_register-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: govuk_country_register-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for govuk_country_register-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fc96aa5fc9127338f102dd21dd11115db4818ad6db19feeb51f6651404078ba
MD5 f882125115f788c3e03002a8ef7cfb01
BLAKE2b-256 0b7a5ede236b169fe04a7a00a23434ff37aa470a4f996be642b879bec3f59695

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page