Python library for the Noodler API
Project description
Noodler Python SDK
Example
from noodler import setup, instrument_openai
from openai import OpenAI
# Configure OpenTelemetry tracing
setup(
base_url="http://localhost:8000",
api_key="noodler-api-key",
)
# Create and instrument OpenAI client
client = OpenAI()
wrapped_client = instrument_openai(client)
# Use the instrumented client - all API calls will be automatically traced
# Non-streaming
response = wrapped_client.chat.completions.create(
model="gpt-4.1",
messages=[
{"role": "user", "content": "hi there!"}
],
)
# Streaming (also supported)
stream = wrapped_client.chat.completions.create(
model="gpt-4.1",
messages=[
{"role": "user", "content": "hi there!"}
],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content, end="")
Features
- ✅ Automatic tracing of
chat.completions.create()calls - ✅ Support for both streaming and non-streaming responses
- ✅ Full OpenTelemetry GenAI semantic convention compliance
- ✅ Token usage tracking
- ✅ Error tracking and span status reporting
Limitations
Currently, only the chat.completions.create() endpoint is instrumented. Other OpenAI endpoints (embeddings, audio, fine-tuning, etc.) are not automatically traced. Calls to these endpoints will work normally but will not generate traces.
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 noodler_sdk-0.1.0.tar.gz.
File metadata
- Download URL: noodler_sdk-0.1.0.tar.gz
- Upload date:
- Size: 55.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16b3b892b4e1d65b855fecd334cb78dd685e5214a6d8cfcbcaec14b46cbcd763
|
|
| MD5 |
ae542b0e55e5dc5f374f92ed3f664fc6
|
|
| BLAKE2b-256 |
fbb509a7c621d414c7128bedd1d32034884cd4d265d263568612a0ef4a4665dd
|
Provenance
The following attestation bundles were made for noodler_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on noodler-dev/noodler-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
noodler_sdk-0.1.0.tar.gz -
Subject digest:
16b3b892b4e1d65b855fecd334cb78dd685e5214a6d8cfcbcaec14b46cbcd763 - Sigstore transparency entry: 812415131
- Sigstore integration time:
-
Permalink:
noodler-dev/noodler-python@eae873832aba0c22804d735df294b2f595a0f86d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/noodler-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@eae873832aba0c22804d735df294b2f595a0f86d -
Trigger Event:
release
-
Statement type:
File details
Details for the file noodler_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: noodler_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 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 |
cfd77e25e0fcc2924cd6d6ae425359f2742658803ac5510b99bc9ef930e955dc
|
|
| MD5 |
9db373133f67af0a2649745ae486d024
|
|
| BLAKE2b-256 |
d7ea426f13fc6d9395974175b6fca7a8e62855076a421df3928dc9881ce2f8c2
|
Provenance
The following attestation bundles were made for noodler_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on noodler-dev/noodler-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
noodler_sdk-0.1.0-py3-none-any.whl -
Subject digest:
cfd77e25e0fcc2924cd6d6ae425359f2742658803ac5510b99bc9ef930e955dc - Sigstore transparency entry: 812415138
- Sigstore integration time:
-
Permalink:
noodler-dev/noodler-python@eae873832aba0c22804d735df294b2f595a0f86d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/noodler-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@eae873832aba0c22804d735df294b2f595a0f86d -
Trigger Event:
release
-
Statement type: