Ardoqpy is a thin client library for the Ardoq REST API. It consists of 2 clients
- ArdoqClient
- thin client for the rest-api
- ArdoqSyncClient
- subclass of ArdoqClient
- maintains a cache of aggregated workspace information
- overrides write operations
- only create components and references if they are not already in the cache
- update cache for create and update operations
- cache hit is based on
- component: name, typeId
- NB: name match is CASE_INSENSITIVE
- reference: source, target, and type
- component: name, typeId
- overriders find_component (comp_name)
- loads aggregated workspace to cache if its not present
- finds component based on name (use at own risk)
(see the test client for examples)
from ardoqpy.ardoqpy import ArdoqClient
ArdoqClient Implemented:
- workspace
- get all
- summary=True is undocumented in the REST docs but returns stats for workspaces
- get by ID
- get by ID aggregated
- create workspace
- delete
- create folder
- move workspace to folder
- get all
- component
- get by ID
- get all for workspace
- create
- delete
- update
- find by name in workspace
- find by field_name / field_value in workspace
- reference
- get all for workspace
- get by ID
- create
- update
- delete
- tag
- get by ID
- get all for workspace
- create
- model
- get by ID
- util
- pprint
- pretty print responses from ardoq calls
- pprint
ArdoqSyncClient Implemented:
- all interfaces from ArdoqClient
- component
- create
- cache check is based on name attribute only (case insensitive)
- update
- create
- reference
- create
- cache check is based on source, target, and type attributes
- update
- create
pip install ardoqpy
- Python 3
- Requests - ardoqpy uses requests package for http requests
To get started, simply install ardoqpy, create an ArdoqClient object and call methods:
edit `ardoq.cfg` to include your API token
make sure `ardoqpy.py` opens your `ardoq.cfg`configuration file
use `testclient.py`as a basis for your own client
or from the console
from ardoqpy.ardoqpy import ArdoqClient
ardoq = ardoqpy.ArdoqClient(hosturl='https://app.ardoq.com', token='_your token_', org='ardoq')
ardoq.get_workspaces()
-
2017/01/25
- Added pip and fields creation support.
-
2016/04/02
- Initial dev
-
2016/06/18
- bug and feature improvements
- first version of the sync client
- complete the full REST-API for fields and tags
The ardoq-python-client is licensed under the MIT License
See LICENSE.md