No project description provided
Project description
Elefantolib for FastAPI
NOTE: Only for this library developers. After clone this repository you should run command:
git config core.hooksPath .githooks
Installation
poetry add elefantolib-fastapi
Example
Prepare
- Add environmental variables
SECRET=
ALGORITHM=
ISSUER=
-
Defaults:
- SECRET - not set, this is required
- ALGORITHM=HS256
- ISSUER=Consumer
Create it
- Create a file
main.py
with:
from elefantolib_fastapi.requests import Request
from elefantolib_fastapi.routes import APIRoute
from fastapi import FastAPI
app = FastAPI()
app.router.route_class = APIRoute
@app.get('/')
def index(request: Request):
# TODO something
response = request.pfm.services.some_service_name.get('path-to-endpoint')
return response
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for elefantolib_fastapi-0.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2456175707d284884a4b25808a2a33ab74a7cf1db3cac13651882136a6a2682f |
|
MD5 | 81e4300d6fc789df4727d0e33c7ddc38 |
|
BLAKE2b-256 | 5f3269fdd0b075da8bc6e7fbff705af8444e940858c2b646a81cd35697fb6dbf |
Close
Hashes for elefantolib_fastapi-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a646e68216d5524e20bd303f713d94df9acad29e9c94010628b1b4a997bd0e |
|
MD5 | 872d961e9b843de8fdf65f76a36adbd4 |
|
BLAKE2b-256 | f76abd955281bc36c86d18dff11e4901eda6a17d0ab3c1a3f8ca999b72dadb9b |