View Source README

Version Docs License CI

OpenFeature Logo

OpenFeature Elixir SDK

👋 Hey there! Thanks for checking out the OpenFeature Elixir SDK

What is OpenFeature?

OpenFeature is an open standard that provides a vendor-agnostic, community-driven API for feature flagging that works with your favorite feature flag management tool.

Why standardize feature flags?

Standardizing feature flags unifies tools and vendors behind a common interface which avoids vendor lock-in at the code level. Additionally, it offers a framework for building extensions and integrations and allows providers to focus on their unique value proposition.

🔧 Components

This repository contains the Elixir SDK. For details, including API documentation, see the respective Hex docs.

💻 Instalation

The package can be installed by adding open_feature to your list of dependencies in mix.exs:

def deps do
  [{:open_feature, "~> 0.1"}]
end

📓 Usage

provider = %OpenFeature.Provider.InMemory{
  flags: %{
    "flag_key" => %{
      disabled: false,
      default_variant: "default",
      variants: %{
        "default" => "default_value"
      }
    }
  }
}
OpenFeature.set_provider("domain", provider)
client = OpenFeature.get_client("domain")
OpenFeature.Client.get_string_value(client, "flag_key", "default")

⭐️ Support the project

📜 License

Apache License 2.0