Lightweight, zero-dependency auth client for Outerbounds platform APIs.
Project description
ob-auth
Lightweight, zero-dependency Python client for authenticating with the Outerbounds platform.
Use ob-auth when you need to call Outerbounds deployment APIs programmatically
without pulling in the full metaflow or outerbounds packages.
Installation
pip install ob-auth
If you use IAM-based authentication (AWS Secrets Manager config), install the optional AWS extra:
pip install ob-auth[aws]
Usage
From local Metaflow config (laptop or inside a deployment)
from ob_auth import OuterboundsAuth
auth = OuterboundsAuth()
auth.init_from_config() # reads ~/.metaflowconfig/config.json
# If the config contains OBP_METAFLOW_CONFIG_URL, the full config
# is fetched remotely using the auth key from the same file.
import urllib.request, json
req = urllib.request.Request(
"https://api-c-xxxxx.your-domain.outerbounds.xyz/predict",
headers=auth.api_headers(),
)
resp = urllib.request.urlopen(req)
print(json.loads(resp.read()))
From an encoded config string (e.g. from Outerbounds UI)
from ob_auth import OuterboundsAuth
auth = OuterboundsAuth()
auth.init(config_string="awssm-arn:BASE64...")
headers = auth.api_headers() # {"x-api-key": "..."}
From a service principal (CI/CD, GitHub Actions)
from ob_auth import OuterboundsAuth
auth = OuterboundsAuth()
auth.init_from_service_principal(
service_principal_name="my-cicd-bot",
deployment_domain="my-company.outerbounds.xyz",
github_actions=True, # or jwt_token="..." for static tokens
)
headers = auth.api_headers()
With ob-events
If you also use ob-events, you can share a single auth instance:
from ob_auth import OuterboundsAuth
from ob_events import EventTrigger
auth = OuterboundsAuth()
auth.init_from_config()
# Use auth for direct API calls
headers = auth.api_headers()
# And pass it to EventTrigger
et = EventTrigger(auth=auth)
et.trigger("my_event", {"key": "value"})
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 ob_auth-0.1.0.tar.gz.
File metadata
- Download URL: ob_auth-0.1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea3cdc496a45c44ecc12d6fe53575fcbf0d24b5c0fda8732b04746676bc92384
|
|
| MD5 |
8cea3cdbfed7b30544ef28dac2a1b29a
|
|
| BLAKE2b-256 |
20bde6f91e2657c7334e7d0b6e71107099912cbdb1e8f27ad84f78f9eb9ab2d7
|
Provenance
The following attestation bundles were made for ob_auth-0.1.0.tar.gz:
Publisher:
publish_ob_auth.yml on outerbounds/obp-foundation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ob_auth-0.1.0.tar.gz -
Subject digest:
ea3cdc496a45c44ecc12d6fe53575fcbf0d24b5c0fda8732b04746676bc92384 - Sigstore transparency entry: 1186239096
- Sigstore integration time:
-
Permalink:
outerbounds/obp-foundation@e9967b0281275dc50516eb6491014228e7ac832f -
Branch / Tag:
refs/heads/master - Owner: https://github.com/outerbounds
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_ob_auth.yml@e9967b0281275dc50516eb6491014228e7ac832f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ob_auth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ob_auth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 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 |
947ebec6ed8819e1a8ac50fc18bbbb7020644df21a4d2a5517fdb3172f8a5ce9
|
|
| MD5 |
d9fbd54175cd7f062a59bd83babdf12f
|
|
| BLAKE2b-256 |
b063cbb71182574103404cbfc3b603ff82d5aa51424625f53db9bc2879df713c
|
Provenance
The following attestation bundles were made for ob_auth-0.1.0-py3-none-any.whl:
Publisher:
publish_ob_auth.yml on outerbounds/obp-foundation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ob_auth-0.1.0-py3-none-any.whl -
Subject digest:
947ebec6ed8819e1a8ac50fc18bbbb7020644df21a4d2a5517fdb3172f8a5ce9 - Sigstore transparency entry: 1186239102
- Sigstore integration time:
-
Permalink:
outerbounds/obp-foundation@e9967b0281275dc50516eb6491014228e7ac832f -
Branch / Tag:
refs/heads/master - Owner: https://github.com/outerbounds
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_ob_auth.yml@e9967b0281275dc50516eb6491014228e7ac832f -
Trigger Event:
workflow_dispatch
-
Statement type: