:py:mod:`abacusai.api_client_utils`
===================================

.. py:module:: abacusai.api_client_utils


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

Classes
~~~~~~~

.. autoapisummary::

   abacusai.api_client_utils.StreamingHandler
   abacusai.api_client_utils.DocstoreUtils



Functions
~~~~~~~~~

.. autoapisummary::

   abacusai.api_client_utils.clean_column_name
   abacusai.api_client_utils.get_clean_function_source_code
   abacusai.api_client_utils.avro_to_pandas_dtype
   abacusai.api_client_utils.get_non_nullable_type
   abacusai.api_client_utils.get_object_from_context
   abacusai.api_client_utils.load_as_pandas_from_avro_fd
   abacusai.api_client_utils.load_as_pandas_from_avro_files
   abacusai.api_client_utils.try_abacus_internal_copy



Attributes
~~~~~~~~~~

.. autoapisummary::

   abacusai.api_client_utils.INVALID_PANDAS_COLUMN_NAME_CHARACTERS


.. py:data:: INVALID_PANDAS_COLUMN_NAME_CHARACTERS
   :value: '[^A-Za-z0-9_]'

   

.. py:function:: clean_column_name(column)


.. py:function:: get_clean_function_source_code(func)


.. py:function:: avro_to_pandas_dtype(avro_type)


.. py:function:: get_non_nullable_type(types)


.. py:class:: StreamingHandler

   Bases: :py:obj:`str`

   str(object='') -> str
   str(bytes_or_buffer[, encoding[, errors]]) -> str

   Create a new string object from the given object. If encoding or
   errors is specified, then the object must expose a data buffer
   that will be decoded using the given encoding and error handler.
   Otherwise, returns the result of object.__str__() (if defined)
   or repr(object).
   encoding defaults to sys.getdefaultencoding().
   errors defaults to 'strict'.


.. py:function:: get_object_from_context(client, context, variable_name, return_type)


.. py:function:: load_as_pandas_from_avro_fd(fd)


.. py:function:: load_as_pandas_from_avro_files(files, download_method, max_workers = 10)


.. py:class:: DocstoreUtils

   Utility class for loading docstore data.
   Needs to be updated if docstore formats change.

   .. py:attribute:: DOC_ID
      :value: 'doc_id'

      

   .. py:attribute:: PREDICTION_PREFIX
      :value: 'prediction'

      

   .. py:attribute:: FIRST_PAGE
      :value: 'first_page'

      

   .. py:attribute:: LAST_PAGE
      :value: 'last_page'

      

   .. py:attribute:: PAGE_TEXT
      :value: 'page_text'

      

   .. py:attribute:: PAGES
      :value: 'pages'

      

   .. py:attribute:: TOKENS
      :value: 'tokens'

      

   .. py:attribute:: PAGES_ZIP_METADATA
      :value: 'pages_zip_metadata'

      

   .. py:attribute:: PAGE_DATA
      :value: 'page_data'

      

   .. py:method:: get_archive_id(doc_id)
      :staticmethod:


   .. py:method:: get_page_id(doc_id, page)
      :staticmethod:


   .. py:method:: get_pandas_pages_df(df, feature_group_version, doc_id_column, document_column, get_docstore_resource_bytes, max_workers = 10)
      :classmethod:


   .. py:method:: get_pandas_documents_df(df, feature_group_version, doc_id_column, document_column, get_docstore_resource_bytes, max_workers = 10)
      :classmethod:



.. py:function:: try_abacus_internal_copy(src_suffix, dst_local, raise_exception=True)

   Retuns true if the file was copied, false otherwise


