openfeature

OpenFeature is an open specification that provides a vendor-agnostic, community-driven API for feature flagging that works with your favorite feature flag management tool or in-house solution.
Feature flags are a software development technique that allows teams to enable, disable or change the behavior of certain features or code paths in a product or service, without modifying the source code.
Standardizing feature flags unifies tools and vendors behind a common interface, avoiding vendor lock-in at the code level. It provides a framework for building extensions and integrations that can be shared across the community.
This library implements the crystal version of this specification.
Installation
-
Add the dependency to your
shard.yml:dependencies: openfeature: github: threez/openfeature.cr -
Run
shards install
Usage
require "openfeature"
require "openfeature/provider/*"
OpenFeature.provider = OpenFeature::NoopProvider.new
client = OpenFeature.client("app")
v2_enabled = client.boolean_value("v2_enabled", true)
v2_enabled.should eq(true)
TODO Write usage instructions here
Contributing
- Fork it (https://github.com/your-github-user/openfeature/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Vincent Landgraf - creator and maintainer
API
- OpenAPI specification https://github.com/open-feature/protocol/blob/main/service/openapi.yaml
- https://openfeature.dev/specification/