Skip to main content

featureguards-python

Official Python SDK for FeatureGuards

Installation

python3 -m pip install --upgrade featureguards
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.

Below are a few simple examples:

is_on

# 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

# 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

Release files for featureguards 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for featureguards 0.1.5
File Size Uploaded
featureguards-0.1.5.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for featureguards 0.1.5
File Interpreter ABI Platform
featureguards-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / featureguards-0.1.5.tar.gz

Download URL featureguards-0.1.5.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
54312b80efed7418ccf62964735cad578ac6cfa0e3db8b977013b5780e04995d
BLAKE2b-256 checksum
How to use checksums
8b74e56ac25261d66c4764567fa9c83db54b1818ef0652f608afc911b518bc15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / featureguards-0.1.5-py3-none-any.whl

Download URL featureguards-0.1.5-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1872059ab3c6e80eadf1c1eea94d9e7ad8dac1e62c665dc64b82c45d149f2b17
BLAKE2b-256 checksum
How to use checksums
1f7f2ad8d6e78ab99725fb263b72ef91792f8ef2bd2c553013bcf72e83726770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page