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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d317161581ac9347da9b0af75fe571ff4cc4172b57cf9b75fd187e89fdfa7610 |
|
MD5 | 09a44833e4d39447e4bb2f231b98b28d |
|
BLAKE2b-256 | 0d5401ed824f9f59efc42843e37ab97e5690f38d32cb883af037140633921998 |
Close
Hashes for elefantolib_fastapi-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27a6af242fca60f579634aff54b91c39225cd70cd31bbc9da5dd00e9ab024579 |
|
MD5 | 1b8fe6f8be511ca6fd45d4267bf21d42 |
|
BLAKE2b-256 | 3e06575f5c19e8cff60a828675efa00d66c745d416b25c04045b86ae09e24c61 |