Skip to main content

Introduction

Feature flagging should not be so complicated.

Mr Flagly is a decentralized feature flagging system written in Rust with bindings for other languages.

It does not depend on third party services or require you to deploy services and databases to manage.

Supported feature flag definition sources:

  • URL
  • JSON Value
  • Environment Variable

Rust usage

Setup your flag service:

use mrflagly::service::{FlagService, FlagServiceOptions};
let flag_service = FlagService::new(FlagServiceOptions {
    finder_type: mrflagly::service::types::FlagFinderType::URL,
    url: "https://path/to/hosted/json/file",
    refresh_interval: 600,
    data: None,
    env_var: None,
})

Then, to check for feature flag:

if flag_service.enabled("feature_x", false /* default value */, Some(HashMap::from([(String::from("user_id"), String::from("123")),])) /* optional context */) {
    // do something
}

Python support

import mrflagly

flag_service = mrflagly.FlagService(url="https://path/to/hosted/json/file")
if flag_service.enabled("feature_x", default=False, context={"foo": "bar"}):
    # do something

FlagService constructor parameters

  • finder_type: (NULL, URL, JSON, ENVVAR)
  • url: URL to download feature flag json data
  • refresh_interval: How often to poll the feature flag data endpoint
  • data: Instead of hosting feature flag data from URL, you can provide it as a json blob
  • env_var: Provide feature flag data in environment variable

JSON format

JSON format for feature flag data:

{
    "my_feature": {
        "rollout": 100
    },
    "my_feature_with_variants": {
        "rollout": 0,
        "variants" {
            "user_id": ["123"],
            "company_id": ["123"]
        }
    }
}

Example activating for a particular customer

JSON config data:

{
    "feature": {
        "rollout": 0,
        "variants": {
            "customer_id": ["123"]
        }
    }
}

Usage:

import mrflagly
import json

flag_service = mrflagly.FlagService(
    data=json.dumps({"feature": {"rollout": 0, "variants": {"customer_id": ["123"]}}}))

if flag_service.enabled("feature_x", default=False, context={"customer_id": "123"}):
    # do something

Metadata

Release files for mrflagly 0.2.16

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

Built distributions (wheels)

Table of built distributions (wheels) for mrflagly 0.2.16
File Actions
mrflagly-0.2.16-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for mrflagly-0.2.16-cp310-abi3-win_amd64.whl
mrflagly-0.2.16-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for mrflagly-0.2.16-cp310-abi3-manylinux_2_28_x86_64.whl
mrflagly-0.2.16-cp310-abi3-manylinux_2_28_i686.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-32 Details for mrflagly-0.2.16-cp310-abi3-manylinux_2_28_i686.whl
mrflagly-0.2.16-cp310-abi3-manylinux_2_28_armv7l.whl CPython 3.10 abi3 Linux glibc 2.28+ ARMv7l Details for mrflagly-0.2.16-cp310-abi3-manylinux_2_28_armv7l.whl
mrflagly-0.2.16-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for mrflagly-0.2.16-cp310-abi3-manylinux_2_28_aarch64.whl
mrflagly-0.2.16-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for mrflagly-0.2.16-cp310-abi3-macosx_11_0_arm64.whl
mrflagly-0.2.16-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for mrflagly-0.2.16-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 9.5 MB

Release files / mrflagly-0.2.16-cp310-abi3-win_amd64.whl

Download URL mrflagly-0.2.16-cp310-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c0a73eabe6a54f907d76c296becd5e15d5aed6536939ec6b9c5d857319632ea1
BLAKE2b-256 checksum
How to use checksums
63873e0c9466caf27c43a7cabdf98507e196b1ca9ad5e90bd461c0a149826f10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / mrflagly-0.2.16-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL mrflagly-0.2.16-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
02943a51402b4b9f98c626f32152eb5aa12f6cb529f21938fd19687629a36950
BLAKE2b-256 checksum
How to use checksums
c6d9d9af33fe07d28ac2953078dc78e853ad2bac87f421c40b5f484aa9b9c67c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / mrflagly-0.2.16-cp310-abi3-manylinux_2_28_i686.whl

Download URL mrflagly-0.2.16-cp310-abi3-manylinux_2_28_i686.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-32 abi3
SHA-256 checksum
How to use checksums
d8cbf34ee5d1e7a0d7603b7e42ade02fce0be74d21688a736e7dc8b3961df095
BLAKE2b-256 checksum
How to use checksums
08516fcf99d97e66358f9f4e89b99c00a6ead2b7b6145a00f0c6ec4b0a1cfcf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / mrflagly-0.2.16-cp310-abi3-manylinux_2_28_armv7l.whl

Download URL mrflagly-0.2.16-cp310-abi3-manylinux_2_28_armv7l.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.28+ ARMv7l abi3
SHA-256 checksum
How to use checksums
af19c3844cb3af76bebe1c3c8d806c7cc0a09ef991e47a813dca90071dda21fa
BLAKE2b-256 checksum
How to use checksums
4f08e1516169fd40783be0f664324b70acb0b602b4969f512ad3ffe6d79cb96d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / mrflagly-0.2.16-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL mrflagly-0.2.16-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
620a653f78707c86f7f85ea3a62cc8fca4d9832c22481b95c3022bf128a20d60
BLAKE2b-256 checksum
How to use checksums
0c8b068b47ffd8040953e4fa0635e24e30b5296d361582c067658d19fafe1bdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / mrflagly-0.2.16-cp310-abi3-macosx_11_0_arm64.whl

Download URL mrflagly-0.2.16-cp310-abi3-macosx_11_0_arm64.whl
Size 1.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2791d9cd01dd10c41b7adcc761c2643f920ddeb8a5dfa304a527353d15eafb18
BLAKE2b-256 checksum
How to use checksums
4649445fb92726f8aefb23b62db19b884585d918b265d22251560e1e3856d1e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / mrflagly-0.2.16-cp310-abi3-macosx_10_12_x86_64.whl

Download URL mrflagly-0.2.16-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2e6bb922b002edf64d3529588f3067fb8e638cb2f2e4a14feed108b87a245293
BLAKE2b-256 checksum
How to use checksums
b445d30ef1238e50b1a9c3bc508275f57ff456e2951901a093e695ea541a40f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for mrflagly 0.2.16

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.

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