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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e030934f02e962ab6c4b351cb6d325954b9e903c91504a05bfb2d87134275fc1 |
|
MD5 | 2be386a46ee9e2e440ff4ed94b8b3f5e |
|
BLAKE2b-256 | 2fa7df4a59007ce214f62d0b64704be1196b00ed577675c01512a0dff81e22ca |
Close
Hashes for elefantolib_fastapi-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017a3ddbcaa7f8805700e93450ee87f3863317ab1b78813585201f8aaf8eb90b |
|
MD5 | 14866e9037729beb99b0651b20e6da33 |
|
BLAKE2b-256 | 4ce1c2d371a341daca3d0a26a2f7b864897a9115a528ff7334be2f0ecaf61ced |