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.7.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: a360_python_libraries-0.3.7.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.7.tar.gz
Algorithm Hash digest
SHA256 4285c450b6d214b2be7780009efbaccabec515f361463bba85f4b0108680ad30
MD5 59899775a063b9cc70e73f0f867288f6
BLAKE2b-256 5f8e907ba94a11d25138834a6ae92205a55dbbe7d948534967e7de409f5fb1a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a360_python_libraries-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 629085a2082b59c2a744d9df815173ee30eb7291a640fcc218c5040c4324876a
MD5 7ce8d58799e0ec71b418d0bc471aaed6
BLAKE2b-256 fac70588e7b11bd3b666a9f159db8ff86b91aff9e5d8d9df6de63259e593a805

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