nyx_client.data =============== .. py:module:: nyx_client.data .. autoapi-nested-parse:: Module that manages individual Nyx Data. Classes ------- .. autoapisummary:: nyx_client.data.Data Module Contents --------------- .. py:class:: Data(name, title, description, org, url, content_type, creator, categories, genre, size = 0, custom_metadata = (), connection_id = None) 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. .. py:attribute:: name :type: str Unique name of data. .. py:attribute:: title :type: str Human readable title of data. .. py:attribute:: description :type: str Short description of data. .. py:attribute:: org :type: str Your organization name. .. py:attribute:: url :type: str The access URL of the data. .. py:attribute:: content_type :type: str Content type of the data, can be in format application/json, or URI. .. py:attribute:: creator :type: str Org name that created the data. .. py:attribute:: categories :type: list[str] The categories of the data. .. py:attribute:: genre :type: str The genre of the data. .. py:attribute:: size :type: int Size in bytes of the data. .. py:attribute:: custom_metadata :type: list[nyx_client.property.Property] Additional metadata properties to decorate the data with. Note that nyx-internal properties are not allowed. .. py:attribute:: connection_id :type: str | None The ID of the connection (id from :class:`nyx_client.connection.Connection`) .. py:method:: __str__() Return a string representation of the Data instance. .. py:method:: 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. .. py:method:: 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.