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.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1625f39cb324221b4bb5cb2f5b034416c58c44b1093105e417573459f37e4f0 |
|
MD5 | 903b1d64ab655ef72ae37e0b52846530 |
|
BLAKE2b-256 | b0e62e0755048231bc81fa1f71d359a8311f6dd39e38cd020712418814d01270 |
Close
Hashes for elefantolib_fastapi-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad309415bfb5809415413ddcbe772a8ef1d8e626c8410617008f4c2b648c6bc3 |
|
MD5 | c8abe8e50835fd67bf71ccfffa32a442 |
|
BLAKE2b-256 | 63c5bb1cbecd8b9414644f31dd89bce8ebde90e2abca11db3ab34e76d744206e |