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.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ca82c2513527a4cec6725097f2193534145cc845b5d97e997df6eff64f9bff9 |
|
MD5 | 74169e29ceabc8c34f12eba5ee8f439d |
|
BLAKE2b-256 | 37eeea1c9a99a3e8ce16590e06926d4ff9e3aa7f8484ecbccf10b7fad413199f |
Close
Hashes for elefantolib_fastapi-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af160d7ba5f008abc54fdbd7d6260f076c630048dae9bb093f2d1d3483c30b9f |
|
MD5 | 813ae71d5b9b5eef341469a0058e65e3 |
|
BLAKE2b-256 | 352ab9a3724b55d340077177bad1a23e1b0c18e3e864cd969add78759c25e480 |