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.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10fc35b6cfef6e5426b1c8b098634194c8dc35d437120a5a7be9990c7a91df07 |
|
MD5 | 13603bf594b245fb03c6af9be1abd1e0 |
|
BLAKE2b-256 | afefaef925ea93e4d20a8d91f0b0eb83b2aee6b6dfd2399cb5d78a9bc169a094 |
Close
Hashes for elefantolib_fastapi-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799f42670c46211ee4b53fb8647aa86df783055e63cb6b6151c864c955b99e55 |
|
MD5 | a1acb021b0728988a9ee2d10665ac63a |
|
BLAKE2b-256 | 36617a07c0422ae7cbffa70d9eeb1feaecf21a706b7f13ffbcfea1bb7382860c |