dev-python/openai - 3.3.1 (bentoo)

Search

Install

Install this version:

emerge -a =dev-python/openai-3.3.1

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-python/openai-3.3.1

Or alternatively:

emerge --autounmask-write -a =dev-python/openai-3.3.1

Package Information

Description:
The official Python library for the OpenAI API
Homepage:
https://github.com/openai/openai-python https://pypi.org/project/openai/
License:
Apache-2.0

Ebuild Details

Version EAPI Keywords Slot
3.3.1 8 ~amd64 ~arm64 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{12..14} )

inherit distutils-r1 pypi

DESCRIPTION="The official Python library for the OpenAI API"
HOMEPAGE="
	https://github.com/openai/openai-python
	https://pypi.org/project/openai/
"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64"

# Upstream extras mapped to USE flags.  Three extras are deliberately NOT
# exposed because at least one of their packages is missing from ::gentoo and
# ::bentoo -- a USE flag nobody can enable is worse than no flag at all:
#   datalib       -> dev-python/pandas-stubs is not packaged (numpy and pandas
#                    are, so only the type stubs are blocking this one).
#   realtime      -> upstream pins websockets>=13,<16 and the only versions in
#                    ::gentoo are >=16.0, so the range is unsatisfiable.
#   voice-helpers -> dev-python/sounddevice is not packaged.
IUSE="aiohttp bedrock"

RDEPEND="
	>=dev-python/anyio-4.10.0[${PYTHON_USEDEP}]
	<dev-python/anyio-5[${PYTHON_USEDEP}]
	>=dev-python/distro-1.7.0[${PYTHON_USEDEP}]
	<dev-python/distro-2[${PYTHON_USEDEP}]
	>=dev-python/httpx2-2.7.0[${PYTHON_USEDEP}]
	<dev-python/httpx2-3[${PYTHON_USEDEP}]
	>=dev-python/jiter-0.10.0[${PYTHON_USEDEP}]
	<dev-python/jiter-1[${PYTHON_USEDEP}]
	>=dev-python/pydantic-1.9.0[${PYTHON_USEDEP}]
	<dev-python/pydantic-3[${PYTHON_USEDEP}]
	dev-python/sniffio[${PYTHON_USEDEP}]
	>dev-python/tqdm-4-r0[${PYTHON_USEDEP}]
	>=dev-python/typing-extensions-4.14[${PYTHON_USEDEP}]
	<dev-python/typing-extensions-5[${PYTHON_USEDEP}]
	aiohttp? ( >=dev-python/aiohttp-3.14.1[${PYTHON_USEDEP}] )
	bedrock? (
		>=dev-python/botocore-1.40.0[${PYTHON_USEDEP}]
		<dev-python/botocore-2[${PYTHON_USEDEP}]
	)
"

# The project readme is a dynamic metadata field produced by the
# hatch-fancy-pypi-readme build hook; without it the hatchling backend aborts.
BDEPEND="dev-python/hatch-fancy-pypi-readme[${PYTHON_USEDEP}]"

# Nearly the whole suite (everything under tests/api_resources) talks to a
# Prism mock API server that upstream expects on http://127.0.0.1:4010, and
# upstream ships no marker that separates those from the offline tests.
RESTRICT="test"

USE Flags

Manage flags for this package: euse -i <flag> -p dev-python/openai | euse -E <flag> -p dev-python/openai | euse -D <flag> -p dev-python/openai

Global/Standard Flags

Inherited Eclasses

Dependencies

RDEPEND

	>=dev-python/anyio-4.10.0[]
	<dev-python/anyio-5[]
	>=dev-python/distro-1.7.0[]
	<dev-python/distro-2[]
	>=dev-python/httpx2-2.7.0[]
	<dev-python/httpx2-3[]
	>=dev-python/jiter-0.10.0[]
	<dev-python/jiter-1[]
	>=dev-python/pydantic-1.9.0[]
	<dev-python/pydantic-3[]
	dev-python/sniffio[]
	>dev-python/tqdm-4-r0[]
	>=dev-python/typing-extensions-4.14[]
	<dev-python/typing-extensions-5[]
	aiohttp? ( >=dev-python/aiohttp-3.14.1[] )
	bedrock? (
		>=dev-python/botocore-1.40.0[]
		<dev-python/botocore-2[]
	)

BDEPEND

dev-python/hatch-fancy-pypi-readme[]