Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Pytest plugin for automatically mocking OpenAI requests. Powered by RESPX.
View full support coverage here.
[!TIP] ✨ Support for creating streaming responses added in v0.4
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.
Available on PyPI
pip install openai-responses
See the documentation site for more info.
See LICENSE for more info.
See CONTRIBUTING.md for info on PRs, issues, and feature requests.
See CHANGELOG.md for summarized notes on changes or view releases for more details information on changes.
FAQs
🧪🤖 Pytest plugin for automatically mocking OpenAI requests
We found that openai-responses demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.