Metadata-Version: 2.1
Name: logiclayer-complexity
Version: 0.5.5
Summary: LogicLayer module to enable Economic Complexity calculations, using data from a tesseract-olap server.
Home-page: https://github.com/Datawheel/logiclayer-complexity
License: MIT
Author: Francisco Abarzua
Author-email: francisco@datawheel.us
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: economic-complexity (>=0.2.4,<0.3.0)
Requires-Dist: logiclayer (>=0.4.0,<0.5.0)
Requires-Dist: orjson (>=3.8.0,<4.0.0)
Requires-Dist: pandas (>=1.5.0)
Requires-Dist: polars (>=0.20.0,<0.21.0)
Requires-Dist: pyarrow (>=15.0.0,<16.0.0)
Requires-Dist: tesseract-olap (>=0.9.6)
Project-URL: Repository, https://github.com/Datawheel/logiclayer-complexity
Description-Content-Type: text/markdown

<p>
<a href="https://github.com/Datawheel/logiclayer-complexity/releases"><img src="https://flat.badgen.net/github/release/Datawheel/logiclayer-complexity" /></a>
<a href="https://github.com/Datawheel/logiclayer-complexity/blob/master/LICENSE"><img src="https://flat.badgen.net/github/license/Datawheel/logiclayer-complexity" /></a>
<a href="https://github.com/Datawheel/logiclayer-complexity/"><img src="https://flat.badgen.net/github/checks/Datawheel/logiclayer-complexity" /></a>
<a href="https://github.com/Datawheel/logiclayer-complexity/issues"><img src="https://flat.badgen.net/github/issues/Datawheel/logiclayer-complexity" /></a>
</p>

## 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.

```python
# 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:

```python
cmplx = EconomicComplexityModule(olap)

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

---
&copy; 2022 [Datawheel, LLC.](https://www.datawheel.us/)  
This project is licensed under [MIT](./LICENSE).

