Skip to main content

Flipt Server SDK

Project description

Flipt Python

pypi

This directory contains the Python source code for the Flipt server-side client.

Documentation

API documentation is available at https://www.flipt.io/docs/reference/overview.

Installation

pip install flipt=={version}

Usage

In your Python code you can import this client and use it as so:

from flipt import FliptClient
from flipt.evaluation import BatchEvaluationRequest, EvaluationRequest

flipt_client = FliptClient()

variant_flag = flipt_client.evaluation.variant(
    EvaluationRequest(
        namespace_key="default",
        flag_key="flagll",
        entity_id="entity",
        context={"fizz": "buzz"},
    )
)

print(variant_flag)

There is a more detailed example in the examples directory.

For developers

After adding new code, please don't forget to add unit tests for new features. To format the code, check it with linters and run tests, use the make check command.

Please keep the Python PEP8 in mind while adding new code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flipt-1.4.0.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

flipt-1.4.0-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page