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.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64fd372d89f610e909f3b01f854877620659fb77ee760507cd80a546992d0f38 |
|
MD5 | f91ba1cc1597797bcf2d927d454620ee |
|
BLAKE2b-256 | 00cbf9baa868055a40043bbe4098699fb630c2620f09e89423ff51025c8184c1 |
Close
Hashes for elefantolib_fastapi-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 935baf8979e0c7df95f07ccaf0cd285f36746100cc1c0ed56df62cbe2ab7861b |
|
MD5 | b272ecda8bf288c41054be1bdee33799 |
|
BLAKE2b-256 | 785879a7a849b61660da84ec96310af3f5e1aec690f7567124b8d8ccbe0c34fc |