Some functionality of cqapi
requires Python version >= 3.7
.
To install the latest version of cqapi
on the master
branch run:
pip install git+ssh://git@github.com/bakdata/cqapi@master
Note that you can specify any branch or tag using the @branch/tag-name
syntax, but the master
branch is where we
attempt to keep a working version of this library.
from cqapi import ConqueryConnection
async with ConqueryConnection("http://conquery-base.url:9082") as cq:
query = await cq.get_query("demo", "query.id")
query_execution_id = await cq.execute_query("demo", query)
query_result = await cq.get_query_result("demo", query_execution_id)
This package can be used just the same in a Jupyter Notebook given that the underlying kernel supports top-level
async
calls.
The IPython shell and IPykernel have
added support for top-level async
since version 7.0.
To make sure you're running the latest versions of both run pip install ipython ipykernel --upgrade
.
Refer to the docs for usage examples.
python -m pytest tests/