{"info":{"author":"OpenAI","author_email":null,"bugtrack_url":null,"classifiers":["Development Status :: 5 - Production\/Stable","Intended Audience :: Developers","Topic :: Software Development :: Libraries :: Python Modules"],"description":"# OpenAI Codex Python SDK\n\nBuild Python applications that start Codex threads, run turns, stream progress,\nand control workspace access.\n\n## Install\n\nInstall the SDK:\n\n```bash\npip install openai-codex\n```\n\n## Quickstart\n\nThe SDK reuses your existing Codex authentication when one is already\navailable:\n\n```python\nfrom openai_codex import Codex\n\nwith Codex() as codex:\n    thread = codex.thread_start()\n    result = thread.run(\"Explain this repository in three bullets.\")\n    print(result.final_response)\n```\n\n`thread.run(...)` returns a `TurnResult` containing the final response,\ncollected items, and token usage.\n\n## Authentication\n\nExisting Codex authentication is reused automatically. To start ChatGPT\nbrowser login explicitly:\n\n```python\nfrom openai_codex import Codex\n\nwith Codex() as codex:\n    login = codex.login_chatgpt()\n    print(login.auth_url)\n    print(login.wait().success)\n```\n\nFor device-code login:\n\n```python\nwith Codex() as codex:\n    login = codex.login_chatgpt_device_code()\n    print(login.verification_url, login.user_code)\n    login.wait()\n```\n\nFor API-key login:\n\n```python\nwith Codex() as codex:\n    codex.login_api_key(\"sk-...\")\n```\n\n## Built-In Help\n\nUse Python's standard `help(openai_codex)`, `help(Codex)`, or\n`python -m pydoc openai_codex` documentation tools.\n\n## Documentation\n\n- [Getting started](https:\/\/github.com\/openai\/codex\/blob\/main\/sdk\/python\/docs\/getting-started.md)\n- [API reference](https:\/\/github.com\/openai\/codex\/blob\/main\/sdk\/python\/docs\/api-reference.md)\n- [Untrusted external messages](https:\/\/github.com\/openai\/codex\/blob\/main\/sdk\/python\/docs\/api-reference.md#externalmessage)\n- [FAQ](https:\/\/github.com\/openai\/codex\/blob\/main\/sdk\/python\/docs\/faq.md)\n- [Examples](https:\/\/github.com\/openai\/codex\/blob\/main\/sdk\/python\/examples\/README.md)\n\nThe package is licensed under the\n[repository Apache License 2.0](https:\/\/github.com\/openai\/codex\/blob\/main\/LICENSE).\n","description_content_type":"text\/markdown","docs_url":null,"download_url":null,"downloads":{"last_day":-1,"last_month":-1,"last_week":-1},"dynamic":null,"home_page":null,"keywords":"codex, sdk, llm, ai, agents","license":null,"license_expression":"Apache-2.0","license_files":null,"maintainer":null,"maintainer_email":null,"name":"openai-codex","package_url":"https:\/\/pypi.org\/project\/openai-codex\/","platform":null,"project_url":"https:\/\/pypi.org\/project\/openai-codex\/","project_urls":{"Documentation":"https:\/\/github.com\/openai\/codex\/tree\/main\/sdk\/python\/docs","Homepage":"https:\/\/github.com\/openai\/codex","Issues":"https:\/\/github.com\/openai\/codex\/issues","Repository":"https:\/\/github.com\/openai\/codex"},"provides_extra":null,"release_url":"https:\/\/pypi.org\/project\/openai-codex\/0.159.2\/","requires_dist":["pydantic>=2.12","packaging>=26.2","openai-codex-cli-bin==0.159.2"],"requires_python":">=3.10","summary":"Python SDK for Codex","version":"0.159.2","yanked":false,"yanked_reason":null},"last_serial":43815578,"ownership":{"organization":"openai","roles":[]},"urls":[{"comment_text":null,"core-metadata":{"sha256":"3dbd1f6220ea6576956dae1e1d6a504d1af4a87a0b720aaf50d26764775601b2"},"digests":{"blake2b_256":"55fd89fa4ab1745e92dc8831f4a51ddc78ef216bfd5fcf3ca93c975c10555b77","md5":"8b4a77421db37536e2eb2c33e535f468","sha256":"03c5a0d7c1da9edc4b62d7b4973d6e8199ce9462a7dec9c6dc9d75a2a88d3786"},"downloads":-1,"filename":"openai_codex-0.159.2-py3-none-any.whl","has_sig":false,"md5_digest":"8b4a77421db37536e2eb2c33e535f468","packagetype":"bdist_wheel","python_version":"py3","requires_python":">=3.10","size":97109,"upload_time":"2026-09-30T00:11:23","upload_time_iso_8601":"2026-09-30T00:11:23.465337Z","url":"https:\/\/files.pythonhosted.org\/packages\/55\/fd\/89fa4ab1745e92dc8831f4a51ddc78ef216bfd5fcf3ca93c975c10555b77\/openai_codex-0.159.2-py3-none-any.whl","yanked":false,"yanked_reason":null},{"comment_text":null,"core-metadata":false,"digests":{"blake2b_256":"f6e5b6a6a60a8b76d5b07e65fa3b696d14e3426959b2c6727218b1d6552a1499","md5":"4ac9517701492192198c2667d6e6cb6f","sha256":"65ba62eb39ad7ee6b77b9f240580d2ab9725a2789b02b2b2a252e852601ce6d2"},"downloads":-1,"filename":"openai_codex-0.159.2.tar.gz","has_sig":false,"md5_digest":"4ac9517701492192198c2667d6e6cb6f","packagetype":"sdist","python_version":"source","requires_python":">=3.10","size":88976,"upload_time":"2026-09-30T00:11:24","upload_time_iso_8601":"2026-09-30T00:11:24.781011Z","url":"https:\/\/files.pythonhosted.org\/packages\/f6\/e5\/b6a6a60a8b76d5b07e65fa3b696d14e3426959b2c6727218b1d6552a1499\/openai_codex-0.159.2.tar.gz","yanked":false,"yanked_reason":null}],"vulnerabilities":[]}