Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elefantolib_fastapi-0.9.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elefantolib_fastapi-0.9.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file elefantolib_fastapi-0.9.2.tar.gz.

File metadata

  • Download URL: elefantolib_fastapi-0.9.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.13 Linux/6.2.0-1015-azure

File hashes

Hashes for elefantolib_fastapi-0.9.2.tar.gz
Algorithm Hash digest
SHA256 adb737d2b93008967774b0d2193e02ea34e5d74cfccb028706b32c6f76f96557
MD5 4cc9919ee17b94d1889fa5bf0a67e647
BLAKE2b-256 e5188fd641489201e9d572e816b5dc9ad7d0c04b76f40c18ac5d4f9bb51786b1

See more details on using hashes here.

File details

Details for the file elefantolib_fastapi-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: elefantolib_fastapi-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.13 Linux/6.2.0-1015-azure

File hashes

Hashes for elefantolib_fastapi-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96e8b5aaba8c3e47d93ceee052aad11901b54e42ffd59e688033620a5cfee0d9
MD5 66bb66a90be0beed97f8e8f04a95476d
BLAKE2b-256 65c4f61693301a0ae9d59efa8cf09f9d56fbce142e30649949ea3707ef97efd0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.9.2 This release

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page