andreafspeziale / nodes

Minimal Flask API to explore a nested set model ⛰️​

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nodes

Minimal Flask API to explore a nested set model.

Check the challenge in the docs folder.

Release) License: MIT Test Docker

Requirements

The project uses sqlite, so the only requirement is:

  • python3

Quickstart

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pre-commit install
flask --app nodes run --debug

Go to the browser and try a sample API call like: http://127.0.0.1:5000/api/nodes/5/children?language=italian

Docker

docker pull andreafspeziale/nodes-app
docker run -p 8000:8000 --rm andreafspeziale/nodes-app

Go to the browser and try a sample API call like: http://127.0.0.1:8000/api/nodes/5/children?language=italian

Development

$ mypy               # type check
$ black .            # formatting
$ pylint nodes tests # linting
$ pytest             # tests

Stay in touch

License

nodes MIT licensed.

About

Minimal Flask API to explore a nested set model ⛰️​

License:MIT License


Languages

Language:Python 95.1%Language:Dockerfile 4.9%