cube-js/cube

Add a Python client library

Open

#1.744 geöffnet am 10. Jan. 2021

Auf GitHub ansehen
 (12 Kommentare) (26 Reaktionen) (0 zugewiesene Personen)Rust (1.965 Forks)batch import
help wanted

Repository-Metriken

Stars
 (19.563 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 16h) (138 gemergte PRs in 30 T)

Beschreibung

Description

Cube.js would greatly benefit from having a Python client to ease adoption by the data science community. I'm opening this issue because I am interested in championing the effort for the development of such a client, starting end of February, to delivery by max end of March.

Python is a different ecosystem from the JS ecosystem, and as such I'd suggest that a redesign of the API be considered to better integrate in the ecosystem/be more pythonic. As for what these changes imply, I do not have a clear opinion yet. Here are a few places to get started:

  1. Refactor to support pythonic syntax & constructs. In python, everything is customizable, which makes it a language with great potential for and examples of powerful APIs. Every class in python implement a subset of the data model hooks, which give the objects of said class specific attributes such as operator logic (addition, multiplication, gte, key access (object[key], a bit like Proxy in JS), etc.). Leveraging these would be key to a successful integration.
  2. Refactor to integrate properly with python's approach to concurrency (none vs asyncio, futures, etc).
  3. Integrate implementation with the data science ecosystem libraries (numpy, pandas, matplotlib, plotly, etc.).

I am no Python expert; I only have ~6-8 months of experience in a data engineering, scripting & data science context, but I'd be happy to contribute to the best of my knowledge to the design of this API. To make this a resounding success however I'd suggest to get some experienced python data scientist's opinion on the API they would like to use as your future customers.

It would also possible (minus a few exceptions) to simply port the API as is, but I think there's much more power in integrating in the language and ecosystem. In the end, it's the team's prerogative to make a choice and I'll be happy to contribute either way :)

Cheers! Philippe

Contributor Guide