Metadata-Version: 2.1
Name: aitoai
Version: 0.2.0
Summary: Aito.ai Python SDK
Home-page: https://github.com/AitoDotAI/aito-python-tools
Author: aito.ai
Author-email: admin@aito.ai
License: UNKNOWN
Project-URL: Documentation, https://aitodotai.github.io/aito-python-tools.
Project-URL: Source, https://github.com/AitoDotAI/aito-python-tools
Project-URL: Tracker, https://github.com/AitoDotAI/aito-python-tools/issues
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Requires-Dist: argcomplete (==1.11.1)
Requires-Dist: langdetect (==1.0.7)
Requires-Dist: ndjson (==0.2.0)
Requires-Dist: python-dotenv (==0.11.0)
Requires-Dist: requests (==2.22.0)
Requires-Dist: xlrd (==1.1.0)
Requires-Dist: pandas (==0.25.3) ; python_full_version <= "3.6.0"
Requires-Dist: pandas (==1.0.0) ; python_full_version > "3.6.0"
Requires-Dist: aiohttp (==3.6.0) ; python_version < "3.8"
Requires-Dist: aiohttp (==3.6.1) ; python_version >= "3.8"

Aito Python SDK
===============

:Info: Check `Github <https://github.com/AitoDotAI/aito-python-tools>`_ for the latest source code and `documentation <https://aitodotai.github.io/aito-python-tools>`__ for more information.
:Maintainer: Aito <admin@aito.ai>

About
-----

The Aito Python SDK is an open-source library that helps you to integrate your Python application
to `Aito <https://aito.ai/>`_ quicker and more efficiently.

The SDK also includes the `Aito Command Line Interface (CLI) <https://aitodotai.github.io/aito-python-tools/cli.html>`_ that enables you to interact with Aito
using commands in your command-line shell, e.g: infer a table schema from a file or upload a file to Aito.


Support / Feedback
------------------

For issues with, questions about, or feedback, please join our `support channels <https://aito.ai/join-slack/>`__.

Installation
------------

Aito Python SDK can be installed with `pip <http://pypi.python.org/pypi/pip>`_::

  $ pip install aito

Check our `installation guide <https://aitodotai.github.io/aito-python-tools/install.html>`_ for more information

Documentation
-------------

You will need `sphinx <https://www.sphinx-doc.org/en/master/>`_ installed to generate the documentation.
Documentation can be generated by::

  $ cd docs
  $ make clean html

Generated documentation can be found in the ``docs/build/html/*`` directory.

Testing
-------

You can use our test cli to run tests::

  $ python -m tests -h

There are multiple test suites:

1. CLI suite:

  .. code-block:: console

    $ python -m tests -v suite cli

  .. note::

    You need an Aito instance and set up the credentials with ```AITO_INSTANCE_URL``` and ```AITO_API_KEY``` to test some functions.

2. SDK suite:

  .. code-block:: console

    $ python -m tests -v suite sdk

  .. note::

    You need an Aito instance and set up the credentials with ```AITO_INSTANCE_URL``` and ```AITO_API_KEY``` to test some functions

3. SQL functions tests:

  - Test against Postgres::

    $ python -m tests -v case sql_functions.test_connection.TestPostgresConnection
    $ python -m tests -v case sql_functions.test_cli_sql_functions.TestPostgresFunctions

  - Test against MySQL:

    .. code-block:: console

      $ python -m tests -v case sql_functions.test_connection.TestMySQLConnection
      $ python -m tests -v case sql_functions.test_cli_sql_functions.TestMySQLFunctions

  .. note::

    To test the SQL functions, you need to install `pyodbc <https://pypi.org/project/pyodbc/>`_ and the specific database ODBC driver.

4. Build and test built package:

  - To build the package::

    $ pip install -r requirements_deploy.txt
    $ ./scripts/deploy test.pypi --no-publish

  - The built wheel should be at ```dist/```. To install::

    $ pip install dist/aitoai-<version>.whl

  - To test the built package, create an environment variable ```TEST_BUILT_PACKAGE``` and run the above tests


