{"id":24607777,"url":"https://github.com/mharrisb1/cube-http-client","last_synced_at":"2025-05-05T22:22:24.001Z","repository":{"id":250945804,"uuid":"835939622","full_name":"mharrisb1/cube-http-client","owner":"mharrisb1","description":"Pythonic HTTP client for Cube.js REST API (sync + async)","archived":false,"fork":false,"pushed_at":"2025-03-04T22:28:31.000Z","size":69,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T16:47:34.048Z","etag":null,"topics":["cube","cubejs","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mharrisb1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-30T20:38:40.000Z","updated_at":"2025-03-04T22:28:34.000Z","dependencies_parsed_at":"2024-07-31T01:13:35.384Z","dependency_job_id":null,"html_url":"https://github.com/mharrisb1/cube-http-client","commit_stats":null,"previous_names":["mharrisb1/cube-http-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fcube-http-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fcube-http-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fcube-http-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mharrisb1%2Fcube-http-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mharrisb1","download_url":"https://codeload.github.com/mharrisb1/cube-http-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252584585,"owners_count":21771986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cube","cubejs","python"],"created_at":"2025-01-24T17:48:46.682Z","updated_at":"2025-05-05T22:22:23.982Z","avatar_url":"https://github.com/mharrisb1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cube-http-client\n\nPythonic HTTP client for [Cube.dev](https://cube.dev) REST API (sync + async support)\n\n## Installation\n\n[![PyPI version](https://badge.fury.io/py/cube-http-client.svg)](https://badge.fury.io/py/cube-http-client)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cube-http-client.svg)](https://pypi.org/project/cube-http-client)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/cube-http-client)](https://pypi.org/project/cube-http-client/)\n\nAvailable on [PyPI](https://pypi.org/project/cube-http-client)\n\n```bash\npip install cube-http-client\n```\n\n## Quickstart\n\n```python\nimport cube_http\n\ncube = cube_http.Client({\"url\": \"...\", \"token\": \"...\"})\n\n# get metadata\nmeta = cube.v1.meta()\n\n# load query results\nresults = cube.v1.load({\n    \"measures\": [\"...\"],\n    \"dimensions\": [\"...\"],\n})\n\n# compile to SQL\ncompiled_sql = cube.v1.sql({\n    \"measures\": [\"...\"],\n    \"dimensions\": [\"...\"],\n})\n```\n\n## Support Coverage\n\n| Endpoint                    | Description                                                                                                                                                               | Supported? |\n| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |\n| `/v1/load`                  | Get the data for a query.                                                                                                                                                 | ✅         |\n| `/v1/sql`                   | Get the SQL Code generated by Cube to be executed in the database.                                                                                                        | ✅         |\n| `/v1/meta`                  | Get meta-information for cubes and views defined in the data model. Information about cubes and views with `public: false` will not be returned.                          | ✅         |\n| `/v1/run-scheduled-refresh` | Trigger a scheduled refresh run to refresh pre-aggregations.                                                                                                              | ❌         |\n| `/v1/pre-aggregations/jobs` | Trigger pre-aggregation build jobs or retrieve statuses of such jobs.                                                                                                     | ❌         |\n| `/readyz`                   | Returns the ready state of the deployment.                                                                                                                                | ❌         |\n| `/livez`                    | Returns the liveness state of the deployment. This is confirmed by testing any existing connections to dataSource. If no connections exist, it will report as successful. | ❌         |\n\n## Usage\n\n### Synchronous\n\n```python\nimport cube_http\n\ncube = cube_http.Client(...)\n```\n\n### Asynchronous\n\n```python\nimport cube_http\n\ncube = cube_http.AsyncClient(...)\n```\n\n### Error handling\n\nError classes are available for each endpoint. For example, handling an API error when calling `/v1/meta` endpoint:\n\n```python\nimport cube_http\nfrom cube_http.exc.v1 import V1MetaError\n\ncube = cube_http.Client(...)\n\ntry:\n    meta = cube.v1.meta()\nexcept V1MetaError as e:\n    print(e)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmharrisb1%2Fcube-http-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmharrisb1%2Fcube-http-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmharrisb1%2Fcube-http-client/lists"}