Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

SubstanceSearch/api

 
 

Repository files navigation

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 documentation
  • GET /api/substance/{slug} - get substance data from all sources
  • GET /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

links

About

drug data api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.3%
  • Dockerfile 4.9%
  • Shell 0.8%