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.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 373aa834b76d43d452a9b04dc616724ecb3967aff0490a4ca11cd7dfb4781721 |
|
MD5 | 8e4ab71ba42da5a8162a5e405d612d9d |
|
BLAKE2b-256 | da94c3e138c9675f1d7107770798c04db28cbac35113caa20860dda58ba8018e |
Close
Hashes for elefantolib_fastapi-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fb092f55265d1c205008677265196064fe3839a8213297806246cdf1ac9dd63 |
|
MD5 | 30e865dd00c42f88be9c08317c5fe5ab |
|
BLAKE2b-256 | 4f439d2c721488330d6290b20af66414e8ab531b39b9ed7e9cd34d7cfbe83f02 |