Skip to main content

Genc provides the information in the Geopolitical Entities, Names and Codes (GENC) standard as a Python distribution.

Installation

$ pip install genc

Usage

>>> import genc
>>> genc.region_by_alpha3('DEU')
Region(alpha3='DEU', alpha2='DE', numeric='276', name='Germany',
       uppername='GERMANY', fullname='Federal Republic of Germany')

>>> genc.region_by_alpha2('DE').name
'Germany'

>>> genc.region_by_name('germany').alpha2
'DE'

>>> genc.region_by_name('unknown region') is None
True

>>> for region in genc.REGIONS:
...     # do something
...     pass

License

genc is offered under the Apache License 2.0.

Changelog

0.2 (2015-09-22)

  • Ensure that all attributes are proper Unicode.

  • Add a JSON version of the subdivision data.

0.1 (2015-09-04)

  • Initial release.

Release files for genc 0.2

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

Source distribution (sdist)

Source distribution for genc 0.2
File Size Uploaded
genc-0.2.zip 17.7 kB Details

Release files / genc-0.2.zip

Download URL genc-0.2.zip
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bf568548cd9c30e2a059110eeb33cecc7fb74875cf10e5c897caf6bc762b6221
BLAKE2b-256 checksum
How to use checksums
68f695a1ae829a2a7081aa7bc23828eb30e3a33b4e660c66ad7403dfe1a565c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

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