Python SDK for the UseFlagly feature-flag API
Project description
useflagly-sdk — SDK para Python
SDK Python para a API de feature flags da UseFlagly.
Instalação
pip install useflagly-sdk
Uso
from useflagly import UseFlaglyClient
from useflagly.models import ValidateBody, ReceiveMessage
client = UseFlaglyClient(token="seu-api-token")
# A URL padrão é https://api.useflagly.com.br — pode ser sobrescrita com base_url='...'
# Validar flag
result = client.validate_flag("minha-flag", ValidateBody(identifier="00000000000"), environment="PRD")
# Ler cache de flag
cache = client.get_flag_cache("minha-flag", identifier="00000000000")
# Validar flow
result = client.validate_flow("meu-flow", ValidateBody(identifier="00000000000"), environment="PRD")
# Validar flow-part
result = client.validate_flow_part("meu-flow-part", ValidateBody(identifier="00000000000"), environment="PRD")
# Validar scenario
result = client.validate_scenario("meu-scenario", ValidateBody(identifier="00000000000"), environment="PRD")
# Inicializar (producer)
client.initialize(ReceiveMessage(identifier="...", slug="...", company_id=1), environment="PRD")
# Buscar resultado
result = client.get_result("00000000000")
Métodos
| Método | Descrição |
|---|---|
health_check() |
Verifica saúde da API |
validate_flag(slug, body, environment?) |
Valida uma feature flag |
get_flag_cache(slug, identifier?) |
Lê o cache de uma flag |
validate_flow(slug, body, environment?) |
Valida um flow |
get_flow_cache(slug, identifier?) |
Lê o cache de um flow |
validate_flow_part(slug, body, environment?) |
Valida um flow-part |
get_flow_part_cache(slug, identifier?) |
Lê o cache de um flow-part |
validate_scenario(slug, body, environment?) |
Valida um scenario |
get_scenario_cache(slug, identifier?) |
Lê o cache de um scenario |
initialize(payload, environment?) |
Inicializa flags (producer) |
get_result(identifier) |
Busca resultado por identifier |
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 flagly_sdk-0.1.6.tar.gz.
File metadata
- Download URL: flagly_sdk-0.1.6.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc70758db08951d53f047c94cb03bb78fccc0ccfc7431a6edb412ad6ce6892d4
|
|
| MD5 |
882e31e5bbd5de806275d85537d35132
|
|
| BLAKE2b-256 |
82d7c226a41b43666e16bd3c4468c4b3d143d9787e619a8f07461c1e89d99cc9
|
Provenance
The following attestation bundles were made for flagly_sdk-0.1.6.tar.gz:
Publisher:
publish-sdk-python.yml on useflagly/backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flagly_sdk-0.1.6.tar.gz -
Subject digest:
dc70758db08951d53f047c94cb03bb78fccc0ccfc7431a6edb412ad6ce6892d4 - Sigstore transparency entry: 1359780561
- Sigstore integration time:
-
Permalink:
useflagly/backend@2a3c7204e461d1fcfdb1dc498e49213d2c5b1213 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/useflagly
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-python.yml@2a3c7204e461d1fcfdb1dc498e49213d2c5b1213 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flagly_sdk-0.1.6-py3-none-any.whl.
File metadata
- Download URL: flagly_sdk-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ecd2690543c65196fddff75eb64955ddf286fdf6293c83c39d074019685f34f
|
|
| MD5 |
12b6fa9192be1163769fbb7183de92e4
|
|
| BLAKE2b-256 |
ec8ae532f047b3758d4e295ff56d25758403a57d44308ccef0fa23c2f787d244
|
Provenance
The following attestation bundles were made for flagly_sdk-0.1.6-py3-none-any.whl:
Publisher:
publish-sdk-python.yml on useflagly/backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flagly_sdk-0.1.6-py3-none-any.whl -
Subject digest:
0ecd2690543c65196fddff75eb64955ddf286fdf6293c83c39d074019685f34f - Sigstore transparency entry: 1359780605
- Sigstore integration time:
-
Permalink:
useflagly/backend@2a3c7204e461d1fcfdb1dc498e49213d2c5b1213 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/useflagly
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk-python.yml@2a3c7204e461d1fcfdb1dc498e49213d2c5b1213 -
Trigger Event:
push
-
Statement type: