Skip to content

URL Module

This section documents the url components of the Nextmv Cloud API.

url

Module for declarations related to upload and download URLs in Nextmv Cloud.

CLASS DESCRIPTION
DownloadURL

Represents a download URL for fetching content from Nextmv Cloud.

UploadURL

Represents an upload URL for sending content to Nextmv Cloud.

DownloadURL

Bases: BaseModel

Result of getting a download URL.

You can import the DownloadURL class directly from cloud:

from nextmv.cloud import DownloadURL

This class represents a download URL that can be used to fetch content from Nextmv Cloud, typically used for downloading large run results.

ATTRIBUTE DESCRIPTION
url

URL to use for downloading the file.

TYPE: str

Examples:

>>> download_url = DownloadURL(url="https://example.com/download")
>>> response = requests.get(download_url.url)

url instance-attribute

url: str

URL to use for downloading the file.

UploadURL

Bases: BaseModel

Result of getting an upload URL.

You can import the UploadURL class directly from cloud:

from nextmv.cloud import UploadURL

This class represents an upload URL that can be used to send data to Nextmv Cloud, typically used for uploading large inputs for runs.

ATTRIBUTE DESCRIPTION
upload_id

ID of the upload, used to reference the uploaded content.

TYPE: str

upload_url

URL to use for uploading the file.

TYPE: str

Examples:

>>> upload_url = UploadURL(upload_id="123", upload_url="https://example.com/upload")
>>> with open("large_input.json", "rb") as f:
...     requests.put(upload_url.upload_url, data=f)

upload_id instance-attribute

upload_id: str

ID of the upload.

upload_url instance-attribute

upload_url: str

URL to use for uploading the file.