REST API for Glottolog using Python FastAPI.
Note: This is a project independent of Glottolog.org.
python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt
Clone Glottolog into ./app folder:
cd app
git clone https://github.com/glottolog/glottolog
cd app
uvicorn main:app --reload
Try searching by language e.g.:
http://localhost:8000/v1/search/Indonesian
Try searching by Glottolog id:
http://localhost:8000/v1/lang/pera1256
Run uvicorn main:app --reload
and open http://localhost:8000/docs/
Create the Docker image with:
docker build -t fastapi-glottolog .
Run with:
docker run -d --name fastapi-glottolog-container -p 80:80 fastapi-glottolog
Log in to Container:
docker exec -it -u root fastapi-glottolog-container /bin/bash
Pre-built Image in Docker Hub:
https://hub.docker.com/r/tderflinger/fastapi-glottolog
Pull Image:
docker pull tderflinger/fastapi-glottolog:0.1.0
- Return bibliographical information for languages.
- CLI for API
Glottolog: https://glottolog.org/
pyglottolog: https://github.com/glottolog/pyglottolog
FastAPI: https://fastapi.tiangolo.com/
Fastapi-glottolog is licensed under the MIT License
The Glottolog data is licensed as CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/