Approximate country and language name matching for `pycountry`, making it an even better reference for messy data.
## Motivation
```
>>> import pycountry
>>> pycountry.countries.get(name='Vietnam')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/you/Library/Python/2.7/lib/python/site-packages/pycountry/db.py", line 85, in get
return self.indices[field][value]
KeyError: 'Vietnam'
>>>
```
'Nuff said.
## Usage
Find a country through the `find_country()` method, giving it an approximate string name. It returns a `Country` object with ISO metadata about the match.
```
>>> import globetrotter
g>>> globetrotter.find_country('Vietnam')
<pycountry.db.Country object at 0x1038eed90>
>>> globetrotter.find_country('Vietnam').name
u'Viet Nam'
```
Find a language through the `find_language()` method in a similar way. It returns a `Language` object.
```
>>> import globetrotter
>>> globetrotter.find_language('Spanish')
<pycountry.db.Language object at 0x103a444d0>
>>> globetrotter.find_language('Spanish').name
u'Spanish; Castilian'
```
Metadata
Release files for globetrotter 0.1.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 |
|---|---|---|---|---|
| globetrotter-0.1.0.tar.gz | 1.8 kB | Without provenance | Details for globetrotter-0.1.0.tar.gz |
Release files / globetrotter-0.1.0.tar.gz
| Download URL | globetrotter-0.1.0.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d92d4af7677b6212a4202e877e7e1b8aeeeffa1e5c015b00da1f8f0e22c9b6c
|
|
BLAKE2b-256 checksum How to use checksums |
16da7520bd679048611b43d5c08568e1cc00e91cde020c593a9ec893fbe8785b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for globetrotter 0.1.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.