gushwork-relay
The Python SDK for the Relay gateway. It is the official OpenAI SDK with Relay's headers and stored prompts added, so chat completions, the Responses API, embeddings, streaming, retries and typed errors work as they do in the OpenAI SDK.
Install
pip install gushwork-relay
Python 3.10 or later.
Quickstart
Set your Relay API key, your gateway URL and the id of a config:
export RELAY_API_KEY=...
export RELAY_BASE_URL=https://<your-gateway-host>/v1
export RELAY_CONFIG=...
from relay_ai import Relay
client = Relay() # reads the three variables above
reply = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(reply.choices[0].message.content)
# A prompt stored in Relay: its template, model and variables.
reply = client.prompts.completions.create(prompt="support-reply@staging", variables={"customer": "Ana"})
print(reply.choices[0].message.content)
AsyncRelay is the asynchronous client. Both take api_key, base_url, config, metadata and trace_id as arguments.
Documentation
The full guide is in the SDKs section of the Relay docs: https://docs.gushwork.org/sdks/.
Metadata
Release files for gushwork-relay 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gushwork_relay-0.2.1.tar.gz | 27.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gushwork_relay-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.0 kB
Release files / gushwork_relay-0.2.1.tar.gz
| Download URL | gushwork_relay-0.2.1.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea80888161562ed02d3fb7009e65da2d43c6b04d7ca1d821cd7b4ac4e2d84e54
|
|
BLAKE2b-256 checksum How to use checksums |
5716fe4fb0159d34b6159984fc7e93f224bd9cbe22ec1e59545a35dbb0d3a24a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gushwork_relay-0.2.1-py3-none-any.whl
| Download URL | gushwork_relay-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c20f38abeb94c385cf3417b4a720b7ecbb21764350b232e1b1ba8599a7a3566f
|
|
BLAKE2b-256 checksum How to use checksums |
2427f187a376b36f4e5841b1cdc06a58a5124ab3d409ed6debd11c6d55c95383
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|