abacusai.api_class.blob_input
=============================

.. py:module:: abacusai.api_class.blob_input


Classes
-------

.. autoapisummary::

   abacusai.api_class.blob_input.Blob
   abacusai.api_class.blob_input.BlobInput


Module Contents
---------------

.. py:class:: Blob(contents, mime_type = None, filename = None, size = None)

   Bases: :py:obj:`abacusai.api_class.abstract.ApiClass`


   An object for storing and passing file data.
   In AI Agents, if a function accepts file upload as an argument, the uploaded file is passed as a Blob object. If a function returns a Blob object, it will be rendered as a file download.

   :param contents: The binary contents of the blob.
   :type contents: bytes
   :param mime_type: The mime type of the blob.
   :type mime_type: str
   :param filename: The original filename of the blob.
   :type filename: str
   :param size: The size of the blob in bytes.
   :type size: int


   .. py:attribute:: filename
      :type:  str


   .. py:attribute:: contents
      :type:  bytes


   .. py:attribute:: mime_type
      :type:  str


   .. py:attribute:: size
      :type:  int


   .. py:method:: from_local_file(file_path)
      :classmethod:



   .. py:method:: from_contents(contents, filename = None, mime_type = None)
      :classmethod:



.. py:class:: BlobInput(filename = None, contents = None, mime_type = None, size = None)

   Bases: :py:obj:`Blob`


   An object for storing and passing file data.
   In AI Agents, if a function accepts file upload as an argument, the uploaded file is passed as a BlobInput object.

   :param filename: The original filename of the blob.
   :type filename: str
   :param contents: The binary contents of the blob.
   :type contents: bytes
   :param mime_type: The mime type of the blob.
   :type mime_type: str
   :param size: The size of the blob in bytes.
   :type size: int


