Skip to main content

LogicLayer module to enable Economic Complexity calculations, using data from a tesseract-olap server.

Project description

Getting started

This module must be used with LogicLayer. An instance of OlapServer from the tesseract_olap package is also required to retrieve the data.

# app.py

from logiclayer import LogicLayer
from logiclayer_complexity import EconomicComplexityModule
from tesseract_olap import OlapServer
from tesseract_olap.logiclayer import TesseractModule

layer = LogicLayer()
olap = OlapServer(backend="clickhouse://...", schema="./schema/")

cmplx = EconomicComplexityModule(olap)
layer.add_module("/complexity", cmplx)

# You can reuse the `olap` object with an instace of `TesseractModule`
tsrc = TesseractModule(olap)
layer.add_module("/tesseract", tsrc)

You can also use the module with a FastAPI instance:

cmplx = EconomicComplexityModule(olap)

app = FastAPI()
app.include_router(cmplx.router, prefix="/complexity")

© 2022 Datawheel, LLC.
This project is licensed under MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logiclayer_complexity-0.5.1.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

logiclayer_complexity-0.5.1-py3-none-any.whl (25.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page