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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6150804c5aa171057c71ac3eca32ded18828ed3619babca8e5ded897ab3602f |
|
MD5 | b3183cab3312aed2a2f2634ef4e4e7a5 |
|
BLAKE2b-256 | 59329f3bb99b888d0e24e6da983f06bbeb95d82406cd7dcbaad2f6a3b6fa7109 |
Close
Hashes for elefantolib_fastapi-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2760d0fb872091040d129d64f22f4238b428f045751760d2a9986b1fd0832270 |
|
MD5 | e22b7dc6b3ab1fe9fd1605fae1825022 |
|
BLAKE2b-256 | 9489d59280bd5982183c3c56337117470efec67ae4457905a41ac115c6bf27ac |