Description
Implement async/await support for flag fetching and updates to improve performance in async applications and prevent blocking operations.
Goals
- Async flag fetching
- Non-blocking update operations
- Compatible with popular async frameworks
- Maintain sync API for backward compatibility
Proposed Features
- Async Flaggle client
- Async storage operations
- Async event listeners
- Integration with async web frameworks
Example Interface
from python_flaggle import AsyncFlaggle
async def main():
flaggle = AsyncFlaggle(
url="https://api.example.com/flags",
interval=60
)
# Async flag checks
if await flaggle.flags["feature_a"].is_enabled():
await enable_feature()
# Async update operations
await flaggle.update_flags()
# Framework integration
app = FastAPI()
@app.get("/feature")
async def check_feature():
return {"enabled": await flaggle.flags["feature"].is_enabled()}
Acceptance Criteria
Description
Implement async/await support for flag fetching and updates to improve performance in async applications and prevent blocking operations.
Goals
Proposed Features
Example Interface
Acceptance Criteria