DeployRamp SDK - Feature flag management for Python
Project description
DeployRamp Python SDK
Python SDK for DeployRamp — AI-native feature flag management.
Installation
pip install deployramp
Usage
import deployramp
deployramp.init(deployramp.SdkConfig(
base_url="https://api.deployramp.com",
public_token="your-public-token",
traits={"plan": "pro", "region": "us-east"},
))
if deployramp.flag("my-feature"):
# feature is enabled
pass
# Report errors for automatic rollback
try:
do_something()
except Exception as e:
deployramp.report(e, flag_name="my-feature")
deployramp.close()
API
init(config: SdkConfig) -> None
Initialize the SDK. Fetches flags and opens a WebSocket for real-time updates.
flag(name: str, trait_overrides: dict | None = None) -> bool
Evaluate a feature flag. Returns False if the SDK is not initialized or the flag is unknown/disabled.
set_traits(traits: dict[str, str]) -> None
Replace the current traits used for flag evaluation.
report(error: Exception | str, flag_name: str | None = None, trait_overrides: dict | None = None) -> None
Report an error to DeployRamp for automatic rollback monitoring.
close() -> None
Flush pending evaluations and close connections.
Requirements
- Python 3.10+
websockets >= 12.0
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deployramp-0.1.6.tar.gz.
File metadata
- Download URL: deployramp-0.1.6.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76aee2bcf68b4cb7a3e869180d987b52c34c81d45df7701aa90ac63307bbda2c
|
|
| MD5 |
102da19d75100e27ca7ddd7e8be2e607
|
|
| BLAKE2b-256 |
ae2de340458d447a9eb74c7f7e751c4285399b1b6a415acf5ab210ba05a79129
|
Provenance
The following attestation bundles were made for deployramp-0.1.6.tar.gz:
Publisher:
sdk-release-python.yml on deployramp/deployramp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deployramp-0.1.6.tar.gz -
Subject digest:
76aee2bcf68b4cb7a3e869180d987b52c34c81d45df7701aa90ac63307bbda2c - Sigstore transparency entry: 1225271761
- Sigstore integration time:
-
Permalink:
deployramp/deployramp@24ced239993ff79c82757dc73632ed034c91e421 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/deployramp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
sdk-release-python.yml@24ced239993ff79c82757dc73632ed034c91e421 -
Trigger Event:
push
-
Statement type:
File details
Details for the file deployramp-0.1.6-py3-none-any.whl.
File metadata
- Download URL: deployramp-0.1.6-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8a10da6eeae76663f2231d88a756ea7bbc2e358a566601d87698456de11d345
|
|
| MD5 |
4a00839d97fae63db9be0defa7949eea
|
|
| BLAKE2b-256 |
2db336c86e97006120cc6cc4bd78c878f8ac07c3e21a84f409f0ebe460940c51
|
Provenance
The following attestation bundles were made for deployramp-0.1.6-py3-none-any.whl:
Publisher:
sdk-release-python.yml on deployramp/deployramp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deployramp-0.1.6-py3-none-any.whl -
Subject digest:
e8a10da6eeae76663f2231d88a756ea7bbc2e358a566601d87698456de11d345 - Sigstore transparency entry: 1225271817
- Sigstore integration time:
-
Permalink:
deployramp/deployramp@24ced239993ff79c82757dc73632ed034c91e421 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/deployramp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
sdk-release-python.yml@24ced239993ff79c82757dc73632ed034c91e421 -
Trigger Event:
push
-
Statement type: