Python SDK
Pythonv0.1.4
Terminal window
Installation
Section titled “Installation”pip install flags-ggQuick Start
Section titled “Quick Start”from flags import new_client
client = new_client( project_id="your-project-id", agent_id="your-agent-id", environment_id="your-environment-id",)
# Check a flagif client.is_("new-feature").enabled(): print("Feature is enabled!")
# List all flagsfor flag in client.list(): print(f"{flag.details.name}: {'enabled' if flag.enabled else 'disabled'}")Error Handling
Section titled “Error Handling”# API failures fall back to cached values automaticallyresult = client.is_("feature")
# Unknown flags return disabledresult = client.is_("non-existent")assert not result.enabled()