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.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae03bea15b85062b31595cd6d504356c34e2446b64cb988cf798b5cfc3e77e29 |
|
MD5 | 996f79df9d0c5313610e9171c63e4a9a |
|
BLAKE2b-256 | 3d29754987f01b5ed7bf3bd17d58f7b20f5d8369d8c653dbca7439d3c080de64 |
Close
Hashes for elefantolib_fastapi-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c7f582d06447c4a769a25efeb7fe23d29d50af9cfeeba81835a53b0c119829 |
|
MD5 | ff23bb85266c5ecc05bf07f7e38e60a8 |
|
BLAKE2b-256 | 65e6dc4a6449dc809abfe8cc53864f72d5349518066814176167d01a53216413 |