Python client for the f69-edge HTTP API
Project description
f69-edge (Python SDK)
Small httpx-based client for the f69-edge HTTP API.
Requires Python 3.11+.
Install
pip install f69
Usage
import os
from f69 import F69EdgeClient, F69EdgeError
client = F69EdgeClient(
base_url=os.environ.get("F69_EDGE_URL", "http://127.0.0.1:8081"),
# From control plane: POST .../service-accounts - use bearer_token or `<id>.<secret_key>`.
# Tokens are reader (evaluate only) or writer (identify + evaluate); each token is bound to one environment.
api_key=os.environ["F69_SERVICE_ACCOUNT_BEARER"],
)
client.health() # GET /health (no auth)
client.identify(
{
"type": "user",
"external_id": "user_42",
"attributes": {"plan": "pro", "region": "eu"},
}
)
flags = client.evaluate({"id": "user_42", "type": "user"})
# flags → [
# {"key": "new_checkout", "value": True, "reason": "TARGETING_MATCH", "version": "live"},
# ...
# ]
client.close()
Evaluate semantics
POST /v1/evaluate takes {"id", "type"} and optional "keys". Omit keys to evaluate every workspace flag; pass a non-empty keys list to
evaluate only those feature keys. The server looks up the entity in the
token's environment (it must have been identified first via /v1/identify)
and replies with a list of results. Each entry carries key, value,
reason (one of TARGETING_MATCH, SPLIT, DEFAULT, FALLBACK,
ERROR), and a manifest version string.
Use as a context manager to close the underlying HTTP client:
with F69EdgeClient(base_url="http://127.0.0.1:8081", api_key="...") as client:
client.health()
Errors on non-2xx responses raise F69EdgeError with status, url, and parsed body when available.
API surface
| Method | HTTP | Auth |
|---|---|---|
health() |
GET /health |
No |
identify(body) |
POST /v1/identify |
Authorization: Bearer <serviceAccountId>.<secretKey> |
evaluate(body) |
POST /v1/evaluate |
Same |
Project details
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 f69-0.1.3.tar.gz.
File metadata
- Download URL: f69-0.1.3.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a21af086c274fcc89e711dd4648740fccdf01e9156a40459879e01f7157e01d7
|
|
| MD5 |
01e6f2bafb72e180c7b3d07fb768f91f
|
|
| BLAKE2b-256 |
1684f699d3550c9e5caf3e74f3977b43cc1eb240bc3483269b7637e63e8d5a6b
|
Provenance
The following attestation bundles were made for f69-0.1.3.tar.gz:
Publisher:
sdk-python-release.yml on rubbieKelvin/f69
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
f69-0.1.3.tar.gz -
Subject digest:
a21af086c274fcc89e711dd4648740fccdf01e9156a40459879e01f7157e01d7 - Sigstore transparency entry: 1339880316
- Sigstore integration time:
-
Permalink:
rubbieKelvin/f69@75959d69f6bb2b9e42b53af193d96e62378c190c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/rubbieKelvin
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-release.yml@75959d69f6bb2b9e42b53af193d96e62378c190c -
Trigger Event:
push
-
Statement type:
File details
Details for the file f69-0.1.3-py3-none-any.whl.
File metadata
- Download URL: f69-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
474faa854ec5691574205508a2311b7e804569ca3735160c2bcfbcefb918ddb1
|
|
| MD5 |
f7a34d6d8f0be317a7203b014dfff43a
|
|
| BLAKE2b-256 |
06dd1afcedd1e59fc3b0540c8b9a5743557a56e50ef20546d18f95ac359bcd0c
|
Provenance
The following attestation bundles were made for f69-0.1.3-py3-none-any.whl:
Publisher:
sdk-python-release.yml on rubbieKelvin/f69
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
f69-0.1.3-py3-none-any.whl -
Subject digest:
474faa854ec5691574205508a2311b7e804569ca3735160c2bcfbcefb918ddb1 - Sigstore transparency entry: 1339880325
- Sigstore integration time:
-
Permalink:
rubbieKelvin/f69@75959d69f6bb2b9e42b53af193d96e62378c190c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/rubbieKelvin
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-release.yml@75959d69f6bb2b9e42b53af193d96e62378c190c -
Trigger Event:
push
-
Statement type: