Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Latest commit

 

History

History
45 lines (28 loc) · 1.43 KB

README.md

File metadata and controls

45 lines (28 loc) · 1.43 KB

cqapi -- ARCHIVED

Build Status

Installation

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.

Usage

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)

Notes on Jupyter Notebooks

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.

Documentation

Refer to the docs for usage examples.

Running Tests

python -m pytest tests/