Flashcards REST API server.
NOTE: This is a work-in-progress, not running application. Do not expect it to just download it and be able to run it if you're not familiar with Python.
> git clone https://github.com/ebisu-flashcards/flashcards-api-server
> cd flashcards_api_server/
> docker build -t flashcards .
> docker run --name flashcards-container -p 8000:8000 -d --rm flashcards
Visit either 127.0.0.1:8000/docs
or 127.0.0.1:8000/redoc
.
You can also see the API docs at https://ebisu-flashcards.github.io/flashcards-api-server/redoc.
> python3 -m venv venv
> source venv/bin/activate
> pip install -e .[dev]
> pre-commit install
> uvicorn flashcards_server.app:app --reload # or python flashcards_server/main.py
INFO: Started server process [XXXX]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:60494 - "GET / HTTP/1.1" 200 OK
... do some changes ...
> pytest
The pre-commit hook runs Black and Flake8 with fairly standard setups. Do not send a PR if these checks, or the tests, are failing.