Skip to main content

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"},
# 'groupe': {'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 20210302

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

Source distribution (sdist)

Source distribution for france-naf 20210302
File Size Uploaded
france-naf-20210302.tar.gz 28.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for france-naf 20210302
File Interpreter ABI Platform
france_naf-20210302-py3-none-any.whl Python 3 none any Details

Total release size: 59.0 kB

Release files / france-naf-20210302.tar.gz

Download URL france-naf-20210302.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
683bf11b3cd103fe42147f73b4817a3c259822bcc2ffcf4e7bd8c0551c8570f3
BLAKE2b-256 checksum
How to use checksums
a0adb15a55d13be4e908c9f4b883f36afd0e4ada7ee618605a2c42eeded39fd7
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-20210302-py3-none-any.whl

Download URL france_naf-20210302-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b35fc7f0e50b2dbbb7e9050155a74b7131e54a303467285374bc75d645a32dc
BLAKE2b-256 checksum
How to use checksums
2cb8048e99b775b3f952d17c3dd9b4af6aabc17e612963596728553d83a41d25
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 history Release notifications | RSS feed

This release

20210302 This release

2 release files

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