🧪🤖 openai-responses
Pytest plugin for automatically mocking OpenAI requests. Powered by RESPX.
Supported Endpoints
- Chat
- Embeddings
- Files
- Models
- Moderations
- Assistants
- Threads
- Messages
- Runs
- Run Steps
- Vector Stores
- Vector Store Files
- Vector Store File Batches
View full support coverage here.
Usage
Just decorate any test function that makes a call to the OpenAI API (either using openai-python or with HTTPX).
import openai
import openai_responses
@openai_responses.mock()
def test_create_assistant():
client = openai.Client(api_key="sk-fake123")
assistant = client.beta.assistants.create(
instructions="You are a personal math tutor.",
name="Math Tutor",
tools=[{"type": "code_interpreter"}],
model="gpt-4-turbo",
)
assert assistant.name == "Math Tutor"
See examples or docs for more.
Installation
Available on PyPI
pip install openai-responses
Documentation
See the documentation site for more info.
License
See LICENSE for more info.
Contributing
See CONTRIBUTING.md for info on PRs, issues, and feature requests.
Changelog
See CHANGELOG.md for summarized notes on changes or view releases for more details information on changes.
Metadata
Release files for openai-responses 0.13.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 | Provenance | Actions |
|---|---|---|---|---|
| openai_responses-0.13.1.tar.gz | 25.2 kB | Without provenance | Details for openai_responses-0.13.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_responses-0.13.1-py3-none-any.whl | Python 3 | none | any | Details for openai_responses-0.13.1-py3-none-any.whl |
Total release size: 77.1 kB
Release files / openai_responses-0.13.1.tar.gz
| Download URL | openai_responses-0.13.1.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0bc5f02e9fd355fed5d25794fa1aed548da23c5e8d7175bd8d37ab75482ee05
|
|
BLAKE2b-256 checksum How to use checksums |
62d419bf1411dbd8eaa84316b14197424018a051874c2a1271582bec67a6fd70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.11.2 Linux/6.1.0-37-amd64
|
Release files / openai_responses-0.13.1-py3-none-any.whl
| Download URL | openai_responses-0.13.1-py3-none-any.whl |
|---|---|
| Size | 51.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5fc7fb15f546b551757864c1dfaeb01b8a4fc0c353961bd6d0d45ff26389721
|
|
BLAKE2b-256 checksum How to use checksums |
089850c755503a55550f170d0211297bc8791b8bf10bf04cb16b4b95ca71d1e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.11.2 Linux/6.1.0-37-amd64
|
Security for openai-responses 0.13.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.