pays
Une librairie pour intégrer des listes (simples) de pays dans ses applications.
Installation
pays est disponible sur pip pour python > 3.
pip install pays
Usage
from pays import Countries
countries = Countries(
'fra', # locale 639-2 pour les traductions des noms, optionnel, fra par défaut
# codes alpha2 de pays à exclure, optionnel
exclude=['ES'],
# codes alpha2 de pays à utiliser exclusivement, optionnel
only=['FR', 'DE']
# note: on ne peut utiliser que exclude OU only, pas les deux à la fois
)
for country in countries: # générateur
print(country) # __str__ retourne nom commun : France
print(country.official_name) # République Française
print(countries.get('FR')) # France
print(countries.get('FRA', 'ita')) # Francia en italien
print(countries.get(250, 'nld')) # Frankrijk en Néerlandais
Pour plus d’informations consultez la documentation
Metadata
Release files for pays 0.2.3
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 | |
|---|---|---|---|---|
| pays-0.2.3.tar.gz | 112.5 kB | Without provenance | Details |
Release files / pays-0.2.3.tar.gz
| Download URL | pays-0.2.3.tar.gz |
|---|---|
| Size | 112.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce2d225071ae030284002c266ec21bcd051a1d8f13a63d179a5daf66fee0bf7c
|
|
BLAKE2b-256 checksum How to use checksums |
01e1aad71394624467fbe91cc88f257cadb2dee758b3ba1e11cf88ff1044e1ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pays 0.2.3
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.