# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class Pip(UniversalBaseModel):
    """
    Use pip to install requirements files and packages
    """

    type: typing.Literal["pip"] = pydantic.Field(default="pip")
    """
    +value=pip
    """

    requirements_path: typing.Optional[str] = pydantic.Field(default=None)
    """
    Path to `requirements.txt` relative to `Path to build context`
    """

    pip_packages: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Define pip package requirements.
    In Python/YAML E.g. ["fastapi>=0.90,<1.0", "uvicorn"]
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
