Installation
Besides the main contents of the package, there are two extra sets of optional packages available:
-
tesseract-olap[clickhouse]
Installs the dependency needed to enable the use of thetesseract_olap.backend.clickhousemodule. -
tesseract-olap[logiclayer]
Should be used when this package is intended for use withlogiclayerto enable an HTTP server for data analysis and exploration. This enables the use of thetesseract_olap.logiclayermodule.
Getting started
In its most basic form, the tesseract-olap package provides you with a way to translate OLAP-type queries into request statements that a data backend can understand and execute safely. The results obtained through the execution of server methods are python objects, and as such, can be used in any way the language allows.
# example.py
import asyncio
from tesseract_olap.backend.clickhouse import ClickhouseBackend
from tesseract_olap import OlapServer
backend = ClickhouseBackend("clickhouse://user:pass@localhost:9000/database")
server = OlapServer(backend=backend, schema="./path/to/schema.xml")
async def get_data():
query = DataRequest.new("cube_name", {
"drilldowns": ["Time", "Country"],
"measures": ["Units", "Duration"],
})
result = await server.execute(query)
return result
if __name__ == "__main__":
asyncio.run(get_data())
The server instance can then be used in other programs as the data provider, for simple (like data exploration) and complex (like data processing) operations.
© 2022 Datawheel, LLC.
This project is licensed under MIT.
Release files for tesseract-olap 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tesseract-olap-0.2.0.tar.gz | 37.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tesseract_olap-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 85.6 kB
Release files / tesseract-olap-0.2.0.tar.gz
| Download URL | tesseract-olap-0.2.0.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5c00cbd70e3a51d6a7564c337c940a40e5c780e2803a8f4b2fce9089afc642e
|
|
BLAKE2b-256 checksum How to use checksums |
375eb07dd95ff17f6ded43b0407e83de5ef9157bedf0c94834e4ec89b4edd228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Windows/10
|
Release files / tesseract_olap-0.2.0-py3-none-any.whl
| Download URL | tesseract_olap-0.2.0-py3-none-any.whl |
|---|---|
| Size | 47.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbdaabdc9670798e31261252a21825e24ed2c7c13b81d13e296863ca272229c5
|
|
BLAKE2b-256 checksum How to use checksums |
25e65be5df909e25cd5ebffd14f06c286786483b5d234141455cf2e9e1dddf5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Windows/10
|