nemo_microservices._types#

Module Contents#

Classes#

HeadersLikeProtocol

HttpxSendArgs

InheritsGeneric

Represents a type that has inherited from Generic

ModelBuilderProtocol

NotGiven

For parameters with a meaningful None value, we need to distinguish between the user explicitly passing None, and the user not passing the parameter at all.

Omit

To explicitly omit something from being sent in a request, use omit.

RequestOptions

Data#

API#

nemo_microservices._types.AnyMapping#

None

nemo_microservices._types.AsyncTransport#

None

nemo_microservices._types.Body#

None

nemo_microservices._types.FileTypes#

None

nemo_microservices._types.Headers#

None

nemo_microservices._types.HeadersLike#

None

class nemo_microservices._types.HeadersLikeProtocol#

Bases: typing_extensions.Protocol

get(__key: str) str | None#
nemo_microservices._types.HttpxFileContent#

None

nemo_microservices._types.HttpxFileTypes#

None

nemo_microservices._types.HttpxRequestFiles#

None

class nemo_microservices._types.HttpxSendArgs#

Bases: typing_extensions.TypedDict

auth: httpx.Auth#

None

follow_redirects: bool#

None

nemo_microservices._types.IncEx: typing_extensions.TypeAlias#

None

class nemo_microservices._types.InheritsGeneric#

Bases: typing_extensions.Protocol

Represents a type that has inherited from Generic

The __orig_bases__ property can be used to determine the resolved type variable for a given base class.

class nemo_microservices._types.ModelBuilderProtocol#

Bases: typing_extensions.Protocol

classmethod build(
*,
response: httpx.Response,
data: object,
) nemo_microservices._types._T#
nemo_microservices._types.ModelT#

‘TypeVar(…)’

nemo_microservices._types.NOT_GIVEN#

‘NotGiven(…)’

class nemo_microservices._types.NotGiven#

For parameters with a meaningful None value, we need to distinguish between the user explicitly passing None, and the user not passing the parameter at all.

User code shouldn’t need to use not_given directly.

For example:

def create(timeout: Timeout | None | NotGiven = not_given): ...


create(timeout=1)  # 1s timeout
create(timeout=None)  # No timeout
create()  # Default timeout behavior
class nemo_microservices._types.Omit#

To explicitly omit something from being sent in a request, use omit.

# as the default `Content-Type` header is `application/json` that will be sent
client.post("/upload/files", files={"file": b"my raw file content"})

# you can't explicitly override the header as it has to be dynamically generated
# to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
client.post(..., headers={"Content-Type": "multipart/form-data"})

# instead you can remove the default `application/json` header by passing omit
client.post(..., headers={"Content-Type": omit})
nemo_microservices._types.PostParser#

None

nemo_microservices._types.ProxiesDict#

None

nemo_microservices._types.ProxiesTypes#

None

nemo_microservices._types.Query#

None

nemo_microservices._types.RequestFiles#

None

class nemo_microservices._types.RequestOptions#

Bases: typing_extensions.TypedDict

extra_json: nemo_microservices._types.AnyMapping#

None

follow_redirects: bool#

None

headers: Headers#

None

idempotency_key: str#

None

max_retries: int#

None

params: nemo_microservices._types.Query#

None

timeout: float | httpx.Timeout | None#

None

nemo_microservices._types.ResponseT#

‘TypeVar(…)’

nemo_microservices._types.StrBytesIntFloat#

None

nemo_microservices._types.Transport#

None

nemo_microservices._types.not_given#

‘NotGiven(…)’

nemo_microservices._types.omit#

‘Omit(…)’