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.2.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f1b4632b1b87ee096d3672c6ff5db8756d09049158122ca6ba441878d1a680d |
|
MD5 | ec528459ddf3f90ee337a770fe1cb2a7 |
|
BLAKE2b-256 | d3ce1bebbeb20353dd27a25ac060b37f1258aa32f708e6b357ae6fac4ac21233 |
Close
Hashes for elefantolib_fastapi-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 868b975fcefc0dcf11c22ca93bd9cc8992ec421319f2a64e5b4dcabcf673a0cc |
|
MD5 | 468d3e0a5364bc211c647c15fde9da32 |
|
BLAKE2b-256 | a647506d71c239a335187596264960f6dcf77ac067aab4ec6309a1e3c1e085b9 |