Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

featurevisor-example-python

A small Python application showing how to use the Featurevisor Python SDK.

Learn more about Featurevisor here.

It fetches a production datafile, creates a Featurevisor instance with customer context, then evaluates a flag, a variation, feature variables, and global variables.

Requirements

Python 3.10 or newer.

Installation

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run the example

python main.py

The application evaluates commerce_platform, checkout_experience, max_items, payment_methods, serviceEndpoints, and supportContact from this datafile:

https://featurevisor-example-cloudflare.pages.dev/production/featurevisor-sdk-v3.json

Expected output:

Commerce platform enabled: true
Checkout variation: express
Maximum checkout items: 25
Payment methods: ['card', 'wallet']
Service endpoint: https://api.eu.example.com (timeout: 1200 ms, retries: 4)
Support contact: support-nl@example.com

Change the context in main.py to see how Featurevisor selects different rules, variations, and global variable overrides.

Featurevisor project

The datafile is generated by the Featurevisor Cloudflare example.

Learn more in the Featurevisor Python SDK documentation.

About

Example application using Featurevisor Python SDK

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages