MCPcopy Index your code
hub / github.com/DataBrewery/cubes

github.com/DataBrewery/cubes @v1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1 ↗ · + Follow
1,137 symbols 3,972 edges 77 files 525 documented · 46%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cubes - Online Analytical Processing Framework for Python

Join the chat at https://gitter.im/DataBrewery/cubes

Flattr this git repo

Cubes is a light-weight Python framework and set of tools for Online Analytical Processing (OLAP), multidimensional analysis and browsing of aggregated data.

Focus on data analysis, in human way

Overview

Purpose is to provide a framework for giving analyst or any application end-user understandable and natural way of presenting the multidimensional data. One of the main features is the logical model, which serves as abstraction over physical data to provide end-user layer.

Features:

  • OLAP and aggregated browsing (default backend is for relational databse - ROLAP)
  • multidimensional analysis
  • logical view of analysed data - how analysts look at data, how they think of data, not not how the data are physically implemented in the data stores
  • hierarchical dimensions (attributes that have hierarchical dependencies, such as category-subcategory or country-region)
  • localizable metadata and data
  • SQL query generator for multidimensional aggregation queries
  • OLAP server – HTTP server based on Flask Blueprint, can be easily integrated into your application.

Download

Current recommended version is 1.1.x. It hasn't been yet tagged so please use the master branch. This version includes SQL backend support out of the box, and other backends have been moved to separate projects (ie. MongoDB). This branch (currently master) will be soon tagged as 1.1 release.

Previous stable version was 1.0.1. This version included all backend types, but no further development will be done on this branch.

Documentation

Latest documentation

Examples

See examples directory in the source code repository for simple examples and use-cases.

See https://github.com/DataBrewery/cubes-examples for more complex examples.

Models

For cubes models see https://github.com/DataBrewery/cubes-models

Development

Source code is in a Git repository on GitHub

git clone git://github.com/DataBrewery/cubes

After you've cloned, you might want to install all of the development dependencies.

pip install -e .[dev]

Build the documentation like so. ::

cd doc
make help
make html

Outputs will go in doc/_*.

Requirements

Python >= 2.7 and Python >= 3.4.1

Most of the requirements are soft (optional) and need to be satisfied only if certain parts of cubes are being used.

  • SQLAlchemy from http://www.sqlalchemy.org/ version >= 0.7.4 - for SQL backend
  • Flask from http://flask.pocoo.org/ for Slicer server
  • Jinja2 from http://jinja.pocoo.org/docs/ for HTML presenters

Support

If you have questions, problems or suggestions, you can send a message to the Google group cubes-discuss.

IRC channel #databrewery on server irc.freenode.net

Report bugs using github issue tracking.

Development

If you are browsing the code and you find something that:

  • is over-complicated or not obvious
  • is redundant
  • can be done in better Python-way

... please let it be known.

Authors

Cubes is written and maintained by Stefan Urbanek (@Stiivi on Twitter) stefan.urbanek@gmail.com and various contributors. See AUTHORS file for more information.

License

Cubes is licensed under MIT license. For full license see the LICENSE file.

Core symbols most depended-on inside this repo

get
called by 133
cubes/ext.py
format
called by 84
cubes/formatters.py
get
called by 80
cubes/server/caching.py
from_metadata
called by 46
cubes/model.py
items
called by 45
cubes/datastructures.py
pop
called by 40
cubes/datastructures.py
hierarchy
called by 38
cubes/model.py
list
called by 36
cubes/slicer/commands.py

Shape

Method 763
Function 181
Class 170
Route 23

Languages

Python99%
TypeScript1%

Modules by API surface

cubes/model.py142 symbols
tests/test_model.py70 symbols
cubes/cells.py62 symbols
cubes/browser.py51 symbols
cubes/server/blueprint.py37 symbols
tests/sql/test_query.py32 symbols
cubes/sql/query.py30 symbols
cubes/sql/functions.py28 symbols
cubes/datastructures.py27 symbols
cubes/errors.py25 symbols
tests/sql/test_browser.py24 symbols
cubes/formatters.py24 symbols

Datastores touched

cubes_testDatabase · 1 repos
dataDatabase · 1 repos
dwDatabase · 1 repos

For agents

$ claude mcp add cubes \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact