Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flagly_sdk-0.1.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flagly_sdk-0.1.5-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file flagly_sdk-0.1.5.tar.gz.

File metadata

  • Download URL: flagly_sdk-0.1.5.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

Hashes for flagly_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7c3fa14bcc5d3392e8533bd9fa93911ccf5b30af9309f313c95884762e6e7b5c
MD5 c03dc7a98653d8e75c1c72c028162481
BLAKE2b-256 8b916b1be36be9b5a0ce162626d0d42a0c527f618dd9aa2f00ba407a467f39ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for flagly_sdk-0.1.5.tar.gz:

Publisher: publish-sdk-python.yml on useflagly/backend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flagly_sdk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: flagly_sdk-0.1.5-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

Hashes for flagly_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 134805715016f51c55154ce4f54f44aebf560aebb576c7bd5f85898dfad1b50c
MD5 079e690bafd34aee72a48b17ae97f5c3
BLAKE2b-256 2e0b10578090bfc2a21741d66460f87fa504963f02554a9bb48a89ebd7ab074e

See more details on using hashes here.

Provenance

The following attestation bundles were made for flagly_sdk-0.1.5-py3-none-any.whl:

Publisher: publish-sdk-python.yml on useflagly/backend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page