Skip to content

tderflinger/fastapi-glottolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-glottolog

License:MIT

REST API for Glottolog using Python FastAPI.

Note: This is a project independent of Glottolog.org.

Installation

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

Run for Development

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

OpenAPI Documentation

Run uvicorn main:app --reload and open http://localhost:8000/docs/

Docker

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

Roadmap

  • Return bibliographical information for languages.
  • CLI for API

References

Glottolog: https://glottolog.org/

pyglottolog: https://github.com/glottolog/pyglottolog

FastAPI: https://fastapi.tiangolo.com/

License

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/

Releases

No releases published

Packages

No packages published