france-naf
Python accessors to NAF/APE codes.
From https://www.insee.fr/fr/information/2406147
Installation
pip install france-naf
Usage
from naf import DB
# Get one NAF object
my_naf = DB["02.30Z"]
print(my_naf)
# "Récolte de produits forestiers non ligneux poussant à l'état sauvage"
"02.30Z" in DB
# True
print(my_naf.section) or print(my_naf.section.code)
# 'A'
print(my_naf.section.description)
# 'AGRICULTURE, SYLVICULTURE ET PÊCHE'
dict(my_naf)
# {'code': '02.30Z',
# 'description': "Récolte de produits forestiers non ligneux poussant à l'état sauvage",
# 'classe': {'code': '02.30',
# 'description': "Récolte de produits forestiers non ligneux poussant à l'état sauvage"},
# 'group': {'code': '02.3',
# 'description': "Récolte de produits forestiers non ligneux poussant à l'état sauvage"},
# 'division': {'code': '02',
# 'description': 'Sylviculture et exploitation forestière'},
# 'section': {'code': 'A', 'description': 'AGRICULTURE, SYLVICULTURE ET PÊCHE'}}
# Iter over NAF objects
for naf in DB:
do_something_with(naf)
# Iter over code, description
for code, description in DB.pairs():
pass
# Get the whole DB as a json string
str(DB)
Release files for france-naf 20210301
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| france-naf-20210301.tar.gz | 28.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| france_naf-20210301-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.8 kB
Release files / france-naf-20210301.tar.gz
| Download URL | france-naf-20210301.tar.gz |
|---|---|
| Size | 28.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eeaa542abd498a6f97060f62793f1cfa18599cf0489cdc81d62cde35f5433c52
|
|
BLAKE2b-256 checksum How to use checksums |
dc5e43bf5d1fbd7904e3d9ccb1b79f7155dd4ff87673fb8e75452a60b7551815
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
|
Release files / france_naf-20210301-py3-none-any.whl
| Download URL | france_naf-20210301-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90caa5b6c33b728dacfee7be705935653cba70782933a1cbb7bfd409e8f13c99
|
|
BLAKE2b-256 checksum How to use checksums |
18aca15041dc0513188b611ffdd67066fff9a334d1e2dca8126227e1e9522160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
|