Python client for the f69-edge HTTP API
Project description
f69-edge (Python SDK)
Small httpx-based client for the f69-edge HTTP API: health, identify, evaluate, and optional open_api_document.
Requires Python 3.11+.
Install
From the repo root (path dependency) or after publishing:
pip install f69-edge
Local development:
cd sdks/python
pip install -e ".[dev]"
Usage
import os
from f69_edge 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(
{
"context": {
"id": "user_42",
"type": "user",
"attributes": {"plan": "pro"},
},
"keys": ["new_checkout"],
}
)
# flags → {"new_checkout": True}
client.close()
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 |
open_api_document() |
GET /openapi.json |
No |
identify(body) |
POST /v1/identify |
Authorization: Bearer <serviceAccountId>.<secretKey> |
evaluate(body) |
POST /v1/evaluate |
Same |
Request and response types match the edge OpenAPI document (open_api_document()).
License
MIT OR Apache-2.0 (same as the f69 workspace).
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.1.tar.gz.
File metadata
- Download URL: f69-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bfc571e8a52d4162ba2d89d5061f7c41c313f843f2860624822474d89278120
|
|
| MD5 |
f4ecaace5264423c2d92114666f24108
|
|
| BLAKE2b-256 |
05ea7b4170260c4366d0f1a19df28cdc6896fa6af97ba69f00e490102d3d0dd3
|
Provenance
The following attestation bundles were made for f69-0.1.1.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.1.tar.gz -
Subject digest:
7bfc571e8a52d4162ba2d89d5061f7c41c313f843f2860624822474d89278120 - Sigstore transparency entry: 1339667021
- Sigstore integration time:
-
Permalink:
rubbieKelvin/f69@25d4921d3998797fd51b7a960fd0b11c443f0379 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rubbieKelvin
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-release.yml@25d4921d3998797fd51b7a960fd0b11c443f0379 -
Trigger Event:
push
-
Statement type:
File details
Details for the file f69-0.1.1-py3-none-any.whl.
File metadata
- Download URL: f69-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.8 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 |
400f6ba82ecfe0114305abb11178f271c548c61078dd450a206aa53ce8167cff
|
|
| MD5 |
f50e0425f6af5a491af7e2eab2fb8d30
|
|
| BLAKE2b-256 |
671eb2fb0fafc8f83d1ea3358aff93ab332dd01e30a05887b9e4dde6d8f7c52c
|
Provenance
The following attestation bundles were made for f69-0.1.1-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.1-py3-none-any.whl -
Subject digest:
400f6ba82ecfe0114305abb11178f271c548c61078dd450a206aa53ce8167cff - Sigstore transparency entry: 1339667041
- Sigstore integration time:
-
Permalink:
rubbieKelvin/f69@25d4921d3998797fd51b7a960fd0b11c443f0379 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/rubbieKelvin
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-python-release.yml@25d4921d3998797fd51b7a960fd0b11c443f0379 -
Trigger Event:
push
-
Statement type: