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.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 160825ecc052e342ad580b71648ac702196cf9464c86478765dfcd49b6f23788 |
|
MD5 | eff78bf91baef5576758fefcad0de632 |
|
BLAKE2b-256 | 2551a0df1b8156cdca42f112c2c2ca777cb17d1a44eec361f21b78e3151c4b7b |
Close
Hashes for elefantolib_fastapi-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b96b2d19f729e95522a8d3635c0dd0f093484e783b8bdefbd6a9427bd43cd1e |
|
MD5 | 5cf683d21c7f694fa90421c289edaefa |
|
BLAKE2b-256 | 0bff0bba7e95d97280540587986e512a4d32b66c08b8b61fbd7572ee39b9c124 |