Skip to main content

A collection of Python libraries for A360

Project description

a360-python-libraries

Python shared libraries for a360 applications

License

This software is proprietary and is intended solely for use by Aesthetics-360 Inc.. Unauthorized use, distribution, or modification of this software outside of Aesthetics-360 Inc. is strictly prohibited.

Add package into your project

poetry add a360-python-libraries

Usage

Role based access control

from fastapi import APIRouter, Depends

from a360_security.depends import require_role
from a360_security.enums import Role

router = APIRouter()

@router.get(
    ...,
    dependencies=[Depends(require_role(Role.ADMIN))]
)
def get() -> dict:
    ...

User dependency

from fastapi import APIRouter, Depends

from a360_security.depends import require_user
from a360_security.dto import UserDTO

router = APIRouter()

@router.get(
    ...,
)
def get(user: UserDTO = Depends(require_user)) -> dict:
    ...

Client platform

from fastapi import APIRouter, Depends

from a360_security.depends import require_client_platform
from a360_security.enums import ClientPlatform

router = APIRouter()

@router.get(
    ...,
)
def get(client_platform: ClientPlatform = Depends(require_client_platform)) -> dict:
    ...

Project details


Download files

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

Source Distribution

a360_python_libraries-0.3.8.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

a360_python_libraries-0.3.8-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file a360_python_libraries-0.3.8.tar.gz.

File metadata

  • Download URL: a360_python_libraries-0.3.8.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure

File hashes

Hashes for a360_python_libraries-0.3.8.tar.gz
Algorithm Hash digest
SHA256 a5bf301969c3ebf08c69eef28007fc8f1700bed9466286d0c7b020d30fc2079f
MD5 ac53ee4cb30c941fcbc1a29e8294bdb3
BLAKE2b-256 ed928f65c12b7e11f2dd48e253e55e6c328a19e9b760e70cb355558b81e6484f

See more details on using hashes here.

File details

Details for the file a360_python_libraries-0.3.8-py3-none-any.whl.

File metadata

File hashes

Hashes for a360_python_libraries-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 88b5fb317b42855697c192e5db1a7868829219fc934821831df0f116a8316489
MD5 8a03f54346e62e96b2f6412b6dee585e
BLAKE2b-256 63469a55d7bc829be2fcacb5c8dbf171e44ccaa6036d8ba8a8198905f2eca168

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page