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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c75ec70679c562829ad4b8de3c0cefc3fa9c6242c3b731c5fc8aad2c56b3b69 |
|
MD5 | 044b6470d046dbb0429d23433093bd98 |
|
BLAKE2b-256 | 3f13af38a14ce0605705a92ff0b9d85a63acd3ecc9705019419ab966c083b3d2 |
Close
Hashes for elefantolib_fastapi-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 261e710f259068e480dbcf8a6ba65e82b6136d3b7d76ade16bd6a5671a6dbee3 |
|
MD5 | 317da15a881c9fe511907af8ce2dd950 |
|
BLAKE2b-256 | 742e029e80365b34cb8012f091d837ce788254b5d16171afb89b5a867ef4ef06 |