Python client for connection server. The client is using REST and GraphQl to communicate with server with requests
module.
AYON Python api should support connection to server with raw REST functions and prepared functionality for work with entities. Must not contain only functionality that can be used with core server functionality.
Module support singleton connection which is using AYON_SERVER_URL
and AYON_API_KEY
environment variables as source for connection. The singleton connection is using ServerAPI
object. There can be created multiple connection to different server at one time, for that purpose use ServerAPIBase
object.
AYON python api is available on PyPi:
pip install ayon-python-api
For development purposes you may follow build guide to build and install custom wheels.
Repository does not have submodules or special cases. Clone is simple as:
git clone git@github.com:ynput/ayon-python-api.git
For wheel build is required a wheel
module from PyPi:
pip install wheel
Open terminal and change directory to ayon-python-api repository and build wheel:
cd <REPOSITORY ROOT>/ayon-python-api
python setup.py sdist bdist_wheel
Once finished a wheel should be created in ./dist/ayon_python_api-<VERSION>-py3-none-any
.
The wheel file can be used to install using pip:
pip install <REPOSITORY ROOT>/dist/ayon_python_api-<VERSION>-py3-none-any
If pip complain that ayon-python-api
is already installed just uninstall existing one first:
pip uninstall ayon-python-api
ServerAPI
objects (right now is used con
or connection
)ServerAPI
methods to global functionsServerAPI
into smaller chunks (somehow), the class has 4k+ lines of code