Name | idg-superset-client JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | A simple REST API Client for Apache-Superset |
upload_time | 2023-07-12 01:26:37 |
maintainer | |
docs_url | None |
author | ciusji |
requires_python | >=3.6 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<div align="center">
<img src="./assets/superset-client.jpg" alt="logo" height="60" />
<br />
<br />
</div>
# Superset Client
A Python Client for Apache Superset REST API.
This is an Alpha version. Stability is not guaranteed.
## Usage
Install the package:
```sh
pip install superset-client
```
Setup a superset client:
```python3
from supersetapiclient.client import SupersetClient
client = SupersetClient(
host="http://localhost:8080",
username="admin",
password="admin",
)
```
When developping in local (only), you may need to accept insecure transport (i.e. http).
This is NOT recommanded outside of local development environement, that is requesting `localhost`.
```python3
import os
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
```
## Quickstart
Get all dashboards or find one by name:
```python3
# Get all dashboards
dashboards = client.dashboards.find()
# Get a dashboard by name
dashboard = client.dashboards.find(dashboard_title="Example")[0]
```
Update dashboard colors, some properties and save changes to server:
```python3
# Update label_colors mapping
print(dashboard.colors)
dashboard.update_colors({
"label": "#fcba03"
})
print(dashboard.colors)
# Change dashboard title
dashboard.dashboard_title = "New title"
# Save all changes
dashboard.save()
```
## Documentation
- [Service of Assets Management](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725725)
- [Service of Data Building](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725719)
- [Directory of Data Platform](https://confluence.idgcapital.com/pages/viewpage.action?pageId=46401007)
## Contributing
Before committing to this repository, you must have [pre-commit](https://pre-commit.com) installed, and install
the following pre-commit hooks:
```sh
pre-commit install --install-hooks -t pre-commit -t pre-push
```
## License
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "",
"name": "idg-superset-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "ciusji",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/6c/14/60f64ddd0834f4b3c1e8c8cebf9897b94deff04b6c5a9de2a9beb972f9da/idg-superset-client-1.0.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <img src=\"./assets/superset-client.jpg\" alt=\"logo\" height=\"60\" />\n <br />\n <br />\n</div>\n\n# Superset Client\n\nA Python Client for Apache Superset REST API.\n\nThis is an Alpha version. Stability is not guaranteed.\n\n## Usage\n\nInstall the package:\n```sh\npip install superset-client\n```\n\nSetup a superset client:\n```python3\nfrom supersetapiclient.client import SupersetClient\n\nclient = SupersetClient(\n host=\"http://localhost:8080\",\n username=\"admin\",\n password=\"admin\",\n)\n```\n\nWhen developping in local (only), you may need to accept insecure transport (i.e. http).\nThis is NOT recommanded outside of local development environement, that is requesting `localhost`.\n\n```python3\nimport os\n\nos.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'\n```\n\n## Quickstart\n\nGet all dashboards or find one by name:\n```python3\n# Get all dashboards\ndashboards = client.dashboards.find()\n\n# Get a dashboard by name\ndashboard = client.dashboards.find(dashboard_title=\"Example\")[0]\n```\n\nUpdate dashboard colors, some properties and save changes to server:\n```python3\n# Update label_colors mapping\nprint(dashboard.colors)\ndashboard.update_colors({\n \"label\": \"#fcba03\"\n})\nprint(dashboard.colors)\n\n# Change dashboard title\ndashboard.dashboard_title = \"New title\"\n\n# Save all changes\ndashboard.save()\n```\n\n## Documentation\n\n- [Service of Assets Management](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725725)\n- [Service of Data Building](https://confluence.idgcapital.com/pages/viewpage.action?pageId=50725719)\n- [Directory of Data Platform](https://confluence.idgcapital.com/pages/viewpage.action?pageId=46401007)\n\n## Contributing\n\nBefore committing to this repository, you must have [pre-commit](https://pre-commit.com) installed, and install\nthe following pre-commit hooks:\n\n```sh\npre-commit install --install-hooks -t pre-commit -t pre-push\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details\n",
"bugtrack_url": null,
"license": "",
"summary": "A simple REST API Client for Apache-Superset",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c1460f64ddd0834f4b3c1e8c8cebf9897b94deff04b6c5a9de2a9beb972f9da",
"md5": "c956fcd8a491507b4df3d6eea9a17d8b",
"sha256": "1f1566d8711203cb6cb7745d8f6c3b0c3a5f2d171d4252ae2254b9646a879a73"
},
"downloads": -1,
"filename": "idg-superset-client-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "c956fcd8a491507b4df3d6eea9a17d8b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 13101,
"upload_time": "2023-07-12T01:26:37",
"upload_time_iso_8601": "2023-07-12T01:26:37.720019Z",
"url": "https://files.pythonhosted.org/packages/6c/14/60f64ddd0834f4b3c1e8c8cebf9897b94deff04b6c5a9de2a9beb972f9da/idg-superset-client-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-12 01:26:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "idg-superset-client"
}