nyx_client.data

Module that manages individual Nyx Data.

Classes

Data

Represents the data in the Nyx system.

Module Contents

class nyx_client.data.Data(name, title, description, org, url, content_type, creator, categories, genre, size=0)

Represents the data in the Nyx system.

This class encapsulates the information and functionality related to the data in the Nyx system, including its metadata and content retrieval.

Parameters:
__str__()

Return a string representation of the Data instance.

as_string()

Download the content of the data as a string.

This method attempts to download the content from the data’s URL.

Returns:

The downloaded content as decoded text or None, if the download fails.

Return type:

str | None

as_bytes()

Download the content of the data as bytes.

This method attempts to download the content from the data’s URL.

Returns:

The downloaded content as bytes or None, if the download fails.

Return type:

bytes | None