Skip to main content

UNSPSC v26 bilingue EN/FR : lookup, hiérarchie et recherche floue sur la nomenclature des marchés publics

Project description

unspsc-fr

La nomenclature UNSPSC v26 bilingue EN/FR, requêtable en Python : lookup de codes, navigation hiérarchique et recherche plein texte insensible aux accents.

Données : 149 849 produits, 21 706 traductions françaises sourcées (gouvernement du Canada). Détails, couverture et licences : github.com/codebysaadbouh/unspsc-fr.

Installation

pip install unspsc-fr

La base SQLite (~88 Mo) est téléchargée au premier usage puis mise en cache (~/.cache/unspsc-fr/). Pour utiliser une base locale : variable d'environnement UNSPSC_FR_DB ou UNSPSC(db_path=...).

Usage

from unspsc_fr import UNSPSC

u = UNSPSC()

u.get(10101501)
# Entry(code=10101501, level='commodity', title_en='Cats', title_fr='Chats', …)
# .title → 'Chats' (repli automatique sur l'anglais si non traduit)

u.search("béton", lang="fr")             # plein texte, accents ignorés
u.search("cemen", lang="en")             # préfixe : saisie incrémentale
u.children()                              # les 58 segments
u.children(10101500)                      # produits d'une classe
u.ancestors(10101501)                     # segment > famille > classe

CLI

unspsc-fr get 10101501
unspsc-fr search "ciment" --lang fr
unspsc-fr children 10100000
unspsc-fr ancestors 10101501 --json

Licences

Code MIT. Codeset © UNDP (UNSPSC®) ; traductions françaises sous Licence du gouvernement ouvert – Canada. Voir le NOTICE du dépôt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unspsc_fr-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unspsc_fr-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file unspsc_fr-0.1.0.tar.gz.

File metadata

  • Download URL: unspsc_fr-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for unspsc_fr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8a1ed01fdc58124b6f8b4f573749de55d9dc3165d8f5e22af449b732173e7989
MD5 e934c7085bb01e07a6aace91aa83efbc
BLAKE2b-256 e8fce97d64269d7b35bdd4f63190e1005a782ad32d4a5c9c8a358c29f880d4f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for unspsc_fr-0.1.0.tar.gz:

Publisher: publish-pypi.yml on codebysaadbouh/unspsc-fr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file unspsc_fr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: unspsc_fr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for unspsc_fr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b4a3be8caf38eae73b4fd480e0359c730926fefa58eed6e7c1b11bb0a98a569
MD5 e05743fe9c420fe21dd00ce3746bd78e
BLAKE2b-256 6f8029c949b8d31b71e226d38dc3c905230711e13e77eac229e5a846424718f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for unspsc_fr-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on codebysaadbouh/unspsc-fr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page