featureguards-0.1.5
توضیحات
Official Python SDK for FeatureGuards
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | featureguards-0.1.5 |
| نام | featureguards |
| نسخه کتابخانه | 0.1.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | FeatureGuards |
| ایمیل نویسنده | eng@featureguards.com |
| آدرس صفحه اصلی | https://github.com/featureguards/featureguards-python |
| آدرس اینترنتی | https://pypi.org/project/featureguards/ |
| مجوز | MIT |
# featureguards-python
Official Python SDK for FeatureGuards
## Installation
```sh
python3 -m pip install --upgrade featureguards
```
```python
from featureguards.feature_flags import feature_flags
from os import getenv
fg = feature_flags(api_key=getenv('FEATUREGUARDS_API_KEY'))
# Simple example checking is feature flag FOO is on
print(fg.is_on('FOO'))
# Passing user_id as an attribute.
print(fg.is_on('FOO', {'user_id': 123}))
```
## Documentation
For details on all the functionality in this library, see the [Python
documentation][pyref].
Below are a few simple examples:
### `is_on`
```python
# Create the featureguards class once.
fg = feature_flags(api_key=getenv('FEATUREGUARDS_API_KEY'))
# Call is_on multiple times.
fg.is_on('FOO')
fg.is_on('BAR')
```
### is_on with attributes
```python
# Create the featureguards class once.
fg = feature_flags(api_key=getenv('FEATUREGUARDS_API_KEY'))
# Call is_on multiple times.
fg.is_on('FOO', {'user_id': 123})
fg.is_on('BAR', {'user_id': 123, 'company_slug': 'acme'})
```
## Examples
See full [examples](examples)
[pyref]: https://pypi.org/project/featureguards/
[issues]: https://github.com/featureguards/featureguards-python/issues/new
[pulls]: https://github.com/featureguards/featureguards-python/pulls
[examples]: https://github.com/featureguards/featureguards-python/blob/main/examples/featureflags.py
[featureguards]: https://featureguards.com
نیازمندی
| مقدار | نام |
|---|---|
| - | grpcio |
| - | grpcio-status |
| - | xxhash |
| - | protobuf |
نحوه نصب
نصب پکیج whl featureguards-0.1.5:
pip install featureguards-0.1.5.whl
نصب پکیج tar.gz featureguards-0.1.5:
pip install featureguards-0.1.5.tar.gz