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 |
Metadata
Release files for flagly-sdk 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flagly_sdk-0.1.9.tar.gz | 3.4 kB | With provenance | Details for flagly_sdk-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flagly_sdk-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for flagly_sdk-0.1.9-py3-none-any.whl |
Total release size: 7.5 kB
Release files / flagly_sdk-0.1.9.tar.gz
| Download URL | flagly_sdk-0.1.9.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dc2552e51d231fa67ac1f6581aeea7d083bb163efc305b69ea6bd1016f3e7b2
|
|
BLAKE2b-256 checksum How to use checksums |
201ef428ff7f8ef8b2a95352980ca7d56d412050d6d503def626b9c5531b42a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logRelease files / flagly_sdk-0.1.9-py3-none-any.whl
| Download URL | flagly_sdk-0.1.9-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c79b91ea06d2a277ee563563fdb7f9bace502eb3bb3ffdc6100b241d82096f1e
|
|
BLAKE2b-256 checksum How to use checksums |
3971b75d8bae7c1aa487dfc99666ada317fa82b137e7189097e2e4a37478a447
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logSecurity for flagly-sdk 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flagly_sdk-0.1.9.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.