wvoliveira / fasrq

Fast API + rqlite with authentication. Just a test.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fasrq

Example API with framework FastAPI and database Rqlite with authentication

Tested

  • Python 3.7.3
  • Pip 18.1
  • Docker 19.03

Developing

Local dependencies

Before run application, we need run the rqlite database with auth.

make run_database

Create virtualenv, install dependencies and run:

make

Or just run with: make run_api

With docker

# run database
make run_database

# in another terminal build and run API
make run

Access to localhost:8000/docs and be happy.

Make GET/PUT/POST/DELETE methods in /docs endpoint.

To clean database and cache, execute: make clean

Routes

  • GET localhost:8000/: Get all items.
  • GET localhost:8000/[id]: Get single item.
  • PUT localhost:8000/: Insert task.
  • POST localhost:8000/: Insert/update task.
  • DELETE localhost:8000/[id]: Delete single item.

About

Fast API + rqlite with authentication. Just a test.


Languages

Language:Python 61.4%Language:Makefile 30.1%Language:Dockerfile 8.5%