Skip to content

OpenFeature SDK

Evaluate Flagship feature flags using OpenFeature.

OpenFeature is the CNCF standard for feature flag interfaces. It provides a vendor-neutral API so you can switch between flag providers without changing evaluation code.

Flagship provides official OpenFeature-compatible SDKs for TypeScript, Python, and Go. The source code is available on GitHub.

SDKPackageRuntimeEvaluation modes
TypeScript@cloudflare/flagshipWorkers, Node.js, browsersWorkers binding, HTTP, browser prefetch cache
Pythoncloudflare-flagshipPython server applicationsHTTP
Gogithub.com/cloudflare/flagship/sdks/goGo server applicationsHTTP

SDKs

Flagship SDKs are organized by language. The TypeScript SDK has separate setup guides for server-side and browser usage because they use different OpenFeature packages and runtime behavior.

Installation

For TypeScript server-side usage:

npm i @cloudflare/flagship @openfeature/server-sdk

For TypeScript browser usage:

npm i @cloudflare/flagship @openfeature/web-sdk

For Python:

Terminal window
uv add cloudflare-flagship

For Go:

Terminal window
go get github.com/cloudflare/flagship/sdks/go

Next steps

  • Set up the server provider for Workers, Node.js, or other server-side runtimes.
  • Set up the client provider for browser applications.
  • Set up the Python SDK for Python server applications.
  • Set up the Go SDK for Go server applications.