Boolean SDK: ACS permission checks with memory and Redis caching
Project description
boolean-sdk
Python SDK for ACS permission checks with in-memory and Redis caching.
Requiere Python 3.9+ (3.10 o superior recomendado).
from boolean.sdk import ACSClient, BooleanSDKConfig
config = BooleanSDKConfig(
acs_base_url="https://example.com/acs",
redis_url="redis://localhost:6379/0",
)
with ACSClient(config) as client:
result = client.check_permission(token, "juzgado", "sentencias", "write")
assert result.allowed in (True, False)
Publicar en PyPI
-
Cuenta en pypi.org y un API token (scope para todo el usuario o solo el proyecto
boolean-sdktras el primer upload). -
Desde esta carpeta (
sdk/python):python -m pip install "build>=1" "twine>=6" python -m build python -m twine check dist/* TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-XXXXXXXX python -m twine upload dist/*
Sustituí
pypi-XXXXXXXXpor el token que te muestra PyPI.Si
twine checkfalla conMetadata is missing required fields: Name, Versiony mencionaMetadata-Version2.3 como máximo, tenés Twine anterior a v6. Actualizá:python -m pip install -U "twine>=6"y volvé a ejecutar elcheck. El comando correcto estwine checkopython -m twine check, nopython twine check.
Para probar antes en TestPyPI: twine upload --repository testpypi dist/* (crear cuenta y token en test.pypi.org).
Integración y prueba manual
- Guía para otro sistema o IA: examples/INTEGRATION.md.
- Script de ejemplo contra un ACS real: examples/check_permission_demo.py.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file boolean_sdk-0.1.1.tar.gz.
File metadata
- Download URL: boolean_sdk-0.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
952e14d6cd1db7c48b6c7bc7bcf273df1d6ee417e3030ef64c6074e708339acc
|
|
| MD5 |
0c9abd9d3b0b4a3e433f33eea9d0dd89
|
|
| BLAKE2b-256 |
04118cc9b493a80e56cd86bc2cd7a70fdf3956488333084889970f726ca44950
|
File details
Details for the file boolean_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: boolean_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4504ff07aa752eda04da7727c43a704e0ce3dfaf3120284a04fdaf49288f43a
|
|
| MD5 |
3b0fa776eecbc7e7add8fda0f5a58eaf
|
|
| BLAKE2b-256 |
a7c8f04730471b64059d724cb13830a49dbab1f6eca5fd53405a3ecc9cee4a5c
|