Skip to main content

Parser d'adresses françaises

Project description

GitHub GitHub contributors Python package PyPI PyPI - Format Build Status GitHub Release Date

AddresseParser

Package Python pour parser et comparer les adresses françaises.

Lancement

Package disponible sur PyPI

Vous pouvez l'installer avec pip:

pip install AdresseParser

Exemple d'utilisation en console Python:

>>> from AdresseParser import AdresseParser
>>> adr_parser = AdresseParser()
>>> result = adr_parser.parse("88 rue de rivoli 75002 paris")
>>> print(result)
{'numero': '88', 'indice': None, 'rue': {'type': 'RUE', 'nom': 'RIVOLI'}, 'code_postal': '75002', 'ville': {'arrondissement': 2, 'nom': 'PARIS'}, 'cedex': [], 'departement': {'numero': 75, 'nom': 'Paris'}, 'region': 'Île-de-France', 'pays': 'France'}
>>> print(result['rue'])
{'type': 'RUE', 'nom': 'RIVOLI'}
>>> print(result['ville']['arrondissement'])
2

Return

{
    "numero": "str",
    "indice": "str",
    "rue":{
          "type": "str",
          "nom": "str"
     },
    "code_postal": "str",
    "ville": {
          "arrondissement": "int",
          "nom": "str"
     },
     "cedex":[
       {
        "libelle": "str",
        "code_insee": "str"
       }
     ],
    "departement": {
          "numero": "str",
          "nom": "str"
     },
    "region": "str",
    "pays": "France"
 }

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

AdresseParser-1.0.9.tar.gz (338.6 kB view hashes)

Uploaded Source

Built Distribution

AdresseParser-1.0.9-py3-none-any.whl (351.3 kB view hashes)

Uploaded Python 3

Supported by

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