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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64219567a81d7074fb455ed7eca9e4400e1d0d8a00b3806288c1ad9944ff2aef |
|
MD5 | 4cf626f0ac79aa0f3712769899afb104 |
|
BLAKE2b-256 | 33ec3d03edf81149b13691e1a10fbdeccdfb2055b11b2ee295c783ac0ec22042 |
Close
Hashes for elefantolib_fastapi-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e44df39a7b4e853b94cd3d75218f2acf127bc7f94202144c5dccbbfa83fabad1 |
|
MD5 | 19865403792f03d091835dd6a01d54ff |
|
BLAKE2b-256 | 0b787f2bd301119ea4ba6dc67d96db7fe5f9b4891d06d20e69dd0d4770671f5c |