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:
    ...

Internal services

from fastapi import APIRouter, Depends

from a360_services import get_dictionary_service
from a360_services.services import DictionaryService

router = APIRouter()

@router.get(
    ...,
)
def get(dict_service: DictionaryService = Depends(get_dictionary_service)) -> dict:
    medical_conditions = dict_service.get_medical_conditions()

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

Uploaded Source

Built Distribution

a360_python_libraries-0.5.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: a360_python_libraries-0.5.0.tar.gz
  • Upload date:
  • Size: 6.9 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.5.0.tar.gz
Algorithm Hash digest
SHA256 03752747640a8db1747f1dd67813003acfd57d38b75ab1396b3faa9ed1a404c2
MD5 2336416c6f4975bb3215bb6e8650a46d
BLAKE2b-256 3379989eccede5b9f98ba99d42fa8baf7c76387e9313cea0b9f0dd8f5155ba30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for a360_python_libraries-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bad0891be607900d8e79580c0bf01686773f911339d2a7f68247560f5e27c1d0
MD5 1eaa85b6faf4e244c4bcf0f67d578c9d
BLAKE2b-256 01abe4a1c67cacb45ab4c7eaf9053511ea543428f3e974d1a0d2f52ce035522a

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