Metadata-Version: 2.1
Name: procaine
Version: 0.1.0
Summary: A REST client library for AICore.
Keywords: AICore,AI API,ai-api
Author: romk
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: requests
Requires-Dist: authlib

Procaine
========

**Procaine** is a REST client library for AICore API.  Reduces the pain.


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

To use Procaine, first install it using pip:

.. code-block:: console

   $ pip install procaine


Usage
-----

Run a flow::

  >>> from procaine import aiapi

  >>> auth = {"url": AUTH_URL, "clientid": CLIENT_ID, "clientsecret": CLIENT_SECRET}
  >>> api = aiapi.Client(AI_API_URL, auth)

  >>> hello = api.execute_flow("hello-world")
  >>> hello
  {'id': 'e96bc32ee9bf9e63', 'message': 'Execution scheduled', 'status': 'UNKNOWN', 'targetStatus': 'COMPLETED'}

  >>> api.execution(hello)
  { ... 'status': 'COMPLETED', ... 'targetStatus': 'COMPLETED'}
  
  >>> logs = api.execution_logs(hello)
  >>> print(logs)
   _____________ 
  < hello world >
   ------------- 
      \
       \
	\     
		      ##        .            
		## ## ##       ==            
	     ## ## ## ##      ===            
	 /""""""""""""""""___/ ===        
    ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~   
	 \______ o          __/            
	  \    \        __/             
	    \____\______/   


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

More usage examples and detailed documentation could be found on https://procaine.readthedocs.io/

