Description
Add support for loading flags from various sources beyond HTTP endpoints, making the library more versatile for different deployment scenarios.
Goals
- Support multiple storage backends
- Allow easy addition of new backends
- Maintain consistent API across backends
Proposed Storage Backends
- File System (JSON, YAML)
- Environment Variables
- Redis
- Database (SQLite, PostgreSQL)
- etcd/Consul
Example Interface
class FlagStorage(ABC):
@abstractmethod
async def load_flags(self) -> dict:
pass
@abstractmethod
async def save_flags(self, flags: dict) -> None:
pass
flaggle = Flaggle(storage=FileSystemStorage("flags.json"))
Acceptance Criteria
Description
Add support for loading flags from various sources beyond HTTP endpoints, making the library more versatile for different deployment scenarios.
Goals
Proposed Storage Backends
Example Interface
Acceptance Criteria