https://github.com/cquest/rnapi
Petite API de recherche dans le Répertoire National des Associations (RNA)
https://github.com/cquest/rnapi
Last synced: about 1 year ago
JSON representation
Petite API de recherche dans le Répertoire National des Associations (RNA)
- Host: GitHub
- URL: https://github.com/cquest/rnapi
- Owner: cquest
- License: agpl-3.0
- Created: 2018-03-03T10:01:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-05T08:20:04.000Z (about 8 years ago)
- Last Synced: 2025-04-15T22:07:54.169Z (about 1 year ago)
- Language: Python
- Size: 25.4 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rnapi
Petite API de recherche dans le Répertoire National des Associations (RNA)
**C'est du très "quick" et sûrement très "dirty" aussi !**
La stack utilisée:
- base postgresql avec l'extension pg_trgm pour les recherches par trigrammes
- script python3 pour interroger la base
- module falcon pour exposer la partie HTTP de l'API
- gunicorn pour servir les requêtes
## Import des données
psql < import_rna.sql
## Installation de l'API
**Utiliser python 3 !!!**
```
mkvirtualenv rnapi -p /usr/bin/python3
pip install -r requirements.txt
```
## Démarrer l'API
```
gunicorn rnapi:app -b 0.0.0.0:1901
```
## Exemples de recherches
Par nom (même approximatif):
- http://stmaur.cquest.org:1901/rna?nom=OpenStreetMap
Par nom + code INSEE de commune:
- http://stmaur.cquest.org:1901/rna?nom=OpenStreetMap&insee=75102
Par code RNA ou de déclaration:
- http://stmaur.cquest.org:1901/rna?rna=W751212517
Par code INSEE de commune:
- http://stmaur.cquest.org:1901/rna?insee=89004
Par code SIRET:
- http://stmaur.cquest.org:1901/rna?siret=41473595100017
Version swagger dispo sur: https://app.swaggerhub.com/apis/cquest/rnapi/0.0.1