flypper-redis
Flypper-redis is a storage backend for the flypper package.
It is backed by Redis so it an be used in a distributed environment and be persisted across restarts.
Installation
Use the package manager pip to install flypper-redis.
pip install flypper-redis
Usage
Build a storage backend:
from redis import Redis
from flypper_redis.storage.redis import RedisStorage
redis = Redis(host="localhost", port=6379, db=0)
storage = RedisStorage(redis=redis, prefix="flypper-demo")
Use it in the web UI:
from flypper.wsgi.web_ui import FlypperWebUI
web_ui = FlypperWebUI(storage=storage)
Use it in your code:
- Build a client for your app
- Use a context
from flypper.client import Client as FlypperClient
# Once per thread
flypper_client = FlypperClient(storage=storage, ttl=10)
# Once per request
flypper_context = FlypperContext(
client=flypper_client,
entries={"user_id": "42"},
)
# Every time you need
flypper_context.is_enabled("flag_name")
flypper_context.is_enabled(
"other_flag_name",
entries={"item_reference": "blue-shampoo"},
)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Metadata
Release files for flypper-redis 0.1.2
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 |
|---|---|---|---|---|
| flypper-redis-0.1.2.tar.gz | 3.5 kB | Without provenance | Details for flypper-redis-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flypper_redis-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for flypper_redis-0.1.2-py3-none-any.whl |
Total release size: 8.8 kB
Release files / flypper-redis-0.1.2.tar.gz
| Download URL | flypper-redis-0.1.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8878912d71e8034c54b796be3595c017acae045e55e6c71da660dccff6bc72bd
|
|
BLAKE2b-256 checksum How to use checksums |
97f1530b9e4da382ca1d55d18cea81ad8051be9efcde444f2f25a34b8d2168e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.5 Linux/5.11.0-7633-generic
|
Release files / flypper_redis-0.1.2-py3-none-any.whl
| Download URL | flypper_redis-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ab92c77d2036b0a3cbf98f3dffe68d459145b19206f1b1b5eab6377469c5660
|
|
BLAKE2b-256 checksum How to use checksums |
f20cd1a4c1b45e46f16fd8e46cb9aa2fa913ccbf24728dfe177199b2527aeb94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.5 Linux/5.11.0-7633-generic
|
Security for flypper-redis 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.