drug data api
https://SubstanceSearch.org
- Python 94.3%
- Dockerfile 4.9%
- Shell 0.8%
| .github | ||
| data | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| app.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
| requirements.txt | ||
| start.sh | ||
harm reduction api for substance information
quick start
with docker (recommended)
# build and run
docker-compose up --build
# or run in background
docker-compose up -d --build
api will be available at http://localhost:8080
without docker
# install python 3.7+
pip install -r requirements.txt
# run
python app.py
api endpoints
GET /- api documentationGET /api/substance/{slug}- get substance data from all sourcesGET /api/substance/{slug}/sources/{source}- get substance data from specific source
examples
# get lsd data
curl http://localhost:8080/api/substance/lsd
# get lsd data from tripsit only
curl http://localhost:8080/api/substance/lsd/sources/tripsit
# get api docs
curl http://localhost:8080/
data sources
- tripsit - community harm reduction database
- psychonautwiki - research-based substance info
production
the docker setup includes:
- gunicorn wsgi server
- health checks
- non-root user
- optimized for production