{"id":24607792,"url":"https://github.com/mharrisb1/openai-responses-python","last_synced_at":"2025-05-05T22:24:58.375Z","repository":{"id":229251542,"uuid":"775199089","full_name":"mharrisb1/openai-responses-python","owner":"mharrisb1","description":"🧪🤖 Pytest plugin for OpenAI requests","archived":false,"fork":false,"pushed_at":"2025-03-17T17:19:20.000Z","size":285,"stargazers_count":42,"open_issues_count":6,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T09:44:36.656Z","etag":null,"topics":["mock","openai","pytest-plugin","python","respx","testing"],"latest_commit_sha":null,"homepage":"https://mharrisb1.github.io/openai-responses-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mharrisb1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-21T00:01:03.000Z","updated_at":"2025-03-17T17:21:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b649edd-3360-4463-9bc0-f2e6cf51b5bc","html_url":"https://github.com/mharrisb1/openai-responses-python","commit_stats":null,"previous_names":["mharrisb1/openai-responses-python"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fopenai-responses-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fopenai-responses-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fopenai-responses-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fopenai-responses-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mharrisb1","download_url":"https://codeload.github.com/mharrisb1/openai-responses-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252584999,"owners_count":21772069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mock","openai","pytest-plugin","python","respx","testing"],"created_at":"2025-01-24T17:48:47.377Z","updated_at":"2025-05-05T22:24:58.369Z","avatar_url":"https://github.com/mharrisb1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧪🤖 openai-responses\n\nPytest plugin for automatically mocking OpenAI requests. Powered by [RESPX](https://github.com/lundberg/respx).\n\n[![sdk support](https://img.shields.io/badge/SDK_Support-v1.66+-white?logo=openai\u0026logoColor=black\u0026labelColor=white)](https://github.com/openai/openai-python)\n\n## Supported Endpoints\n\n- [Chat](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_chat_completion.py)\n- [Embeddings](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_embeddings.py)\n- [Files](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_files.py)\n- [Models](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_models.py)\n- [Moderations](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_moderations.py)\n- [Assistants](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_assistants.py)\n- [Threads](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_threads.py)\n- [Messages](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_messages.py)\n- [Runs](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_runs.py)\n- [Run Steps](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_run_steps.py)\n- [Vector Stores](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_vector_stores.py)\n- [Vector Store Files](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_vector_store_files.py)\n- [Vector Store File Batches](https://github.com/mharrisb1/openai-responses-python/blob/main/examples/test_vector_store_file_batches.py)\n\nView full support coverage [here](https://mharrisb1.github.io/openai-responses-python/coverage).\n\n\u003e [!TIP]\n\u003e ✨ Support for creating [streaming responses](https://mharrisb1.github.io/openai-responses-python/user_guide/streaming/) added in v0.4\n\n## Usage\n\nJust decorate any test function that makes a call to the OpenAI API (either using [openai-python](https://github.com/openai/openai-python) or with [HTTPX](https://www.python-httpx.org/)).\n\n```python\nimport openai\n\nimport openai_responses\n\n\n@openai_responses.mock()\ndef test_create_assistant():\n    client = openai.Client(api_key=\"sk-fake123\")\n\n    assistant = client.beta.assistants.create(\n        instructions=\"You are a personal math tutor.\",\n        name=\"Math Tutor\",\n        tools=[{\"type\": \"code_interpreter\"}],\n        model=\"gpt-4-turbo\",\n    )\n\n    assert assistant.name == \"Math Tutor\"\n```\n\nSee [examples](https://github.com/mharrisb1/openai-responses-python/tree/main/examples) or [docs](https://mharrisb1.github.io/openai-responses-python) for more.\n\n## Installation\n\n[![PyPI version](https://badge.fury.io/py/openai-responses.svg)](https://badge.fury.io/py/openai-responses)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/openai-responses.svg)](https://pypi.org/project/openai-responses/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/openai-responses)](https://pypi.org/project/openai-responses/)\n\nAvailable on [PyPI](https://pypi.org/project/openai-responses/)\n\n```bash\npip install openai-responses\n```\n\n## Documentation\n\n[![Docs](https://github.com/mharrisb1/openai-responses-python/actions/workflows/docs.yml/badge.svg)](https://mharrisb1.github.io/openai-responses-python)\n\nSee the [documentation site](https://mharrisb1.github.io/openai-responses-python) for more info.\n\n## License\n\n[![PyPI - License](https://img.shields.io/pypi/l/openai-responses)](https://opensource.org/blog/license/mit)\n\nSee [LICENSE](https://github.com/mharrisb1/openai-responses-python/blob/main/LICENSE) for more info.\n\n## Contributing\n\n[![Open Issues](https://img.shields.io/github/issues/mharrisb1/openai-responses-python)](https://github.com/mharrisb1/openai-responses-python/issues)\n[![Stargazers](https://img.shields.io/github/stars/mharrisb1/openai-responses-python?style)](https://pypistats.org/packages/openai-responses)\n\nSee [CONTRIBUTING.md](https://github.com/mharrisb1/openai-responses-python/blob/main/CONTRIBUTING.md) for info on PRs, issues, and feature requests.\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/mharrisb1/openai-responses-python/blob/main/CHANGELOG.md) for summarized notes on changes or view [releases](https://github.com/mharrisb1/openai-responses-python/releases) for more details information on changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmharrisb1%2Fopenai-responses-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmharrisb1%2Fopenai-responses-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmharrisb1%2Fopenai-responses-python/lists"}