Skip to main content

reforge-python

Python client for reforge.com, providing Config, FeatureFlags as a Service

Example usage

from sdk_reforge import ReforgeSDK, Options
import sdk_reforge

options = Options(
    sdk_key="your-reforge-sdk-key"
)

context = {
  "user": {
    "team_id": 432,
    "id": 123,
    "subscription_level": 'pro',
    "email": "alice@example.com"
  }
}


sdk_reforge.set_options(options)

result = sdk_reforge.get_sdk().enabled("my-first-feature-flag", context=context)

print("my-first-feature-flag is:", result)

Protocol Buffer Types

If you need to work with the underlying Protocol Buffer types, the following are re-exported for convenience:

from sdk_reforge import ConfigValue, StringList, ProtoContext, ContextSet, ContextShape, LogLevel, Json, Schema

# Create a config value
config_value = ConfigValue(string="example value")

# Create a JSON value
json_value = ConfigValue(json=Json(json='{"key": "value"}'))

# Create a Schema value
schema_value = Schema(definition='{"type": "object", "properties": {"name": {"type": "string"}}}')

See full documentation https://docs.reforge.com/docs/sdks/python

Development

  1. Ensure that poetry is installed: https://python-poetry.org/docs/#installation
  2. From the root of this directory, run poetry install to ensure dependencies are installed
  3. poetry run python to open a Python REPL with access to the project dependencies

Running tests

To run all tests, including integration tests

poetry run pytest tests

To run only local tests and skip integration tests

poetry run pytest tests -k "not integration"

To run only one specific test file

poetry run pytest tests/name_of_test_file.py

Examples

There are examples in examples

Releasing

  1. Run pre-commit hooks to check and fix formatting, other rule enforcement. poetry run pre-commit run --show-diff-on-failure --color=always --all-files
  2. On a branch
    1. Update the version in pyproject.toml
    2. Update CHANGELOG.md
  3. Merge the branch
  4. git tag <version> && git push --tags
  5. poetry publish --build
    1. To do this you will need an pypi.org account, and to be added to this project (ask Michael for an invitation)

Metadata

Release files for sdk-reforge 1.2.2

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

Source distribution (sdist)

Source distribution for sdk-reforge 1.2.2
File Size Uploaded
sdk_reforge-1.2.2.tar.gz 41.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sdk-reforge 1.2.2
File Interpreter ABI Platform
sdk_reforge-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 92.1 kB

Release files / sdk_reforge-1.2.2.tar.gz

Download URL sdk_reforge-1.2.2.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
480f035df697e5f43997f3b07ddd97a02412df0d711c576760d52bdd8d2d563b
BLAKE2b-256 checksum
How to use checksums
4a241e52b2509ab5bd159e27f193cc3484a6cf6ef35ef5d617eb9cc6452ef0c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.

Transparency log

Release files / sdk_reforge-1.2.2-py3-none-any.whl

Download URL sdk_reforge-1.2.2-py3-none-any.whl
Size 50.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2289cd4c702c51fe5b7b9cfe1548b69493b80b2edfc23932fb6b8648637f5fbf
BLAKE2b-256 checksum
How to use checksums
8872e9f41fb153905587af3b06c0bd74db919344b9634d4e4cab87cde9973e4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.12.0

2 release files

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