Yet another Python library for Grafana API
Project description
grafana_api
What is this library for?
Yet another Grafana API library for Python. Support both 2 and 3 Python versions.
Requirements
You need either 2nd or 3rd version of Python and only the requests
library installed.
Quick start
Install the pip package:
pip install -U grafana_api
And then connect to your Grafana API endpoint:
from grafana_api.grafana_face import GrafanaFace
grafana_api = GrafanaFace(auth='abcde....', host='api.my-grafana-host.com')
# Search dashboards based on tag
grafana_api.search.search_dashboards(tag='applications')
# Find a user by email
user = grafana_api.users.find_user('test@test.com')
# Add user to team 2
grafana_api.teams.add_team_member(2, user["id"])
# Create or update a dashboard
grafana_api.dashboard.update_dashboard(dashboard={'dashboard': {...}, 'folderId': 0, 'overwrite': True})
# Delete a dashboard by UID
grafana_api.dashboard.delete_dashboard(dashboard_uid='abcdefgh')
Status of REST API realization
Work on API implementation still in progress.
API | Status |
---|---|
Admin | + |
Alerting | - |
Annotations | + |
Authentication | +- |
Dashboard | + |
Dashboard Versions | - |
Dashboard Permissions | + |
Data Source | + |
Folder | + |
Folder Permissions | + |
Folder/Dashboard Search | +- |
Organisation | + |
Other | + |
Preferences | + |
Snapshot | + |
Teams | + |
User | + |
Issue tracker
Please report any bugs and enhancement ideas using the grafana_api
issue tracker:
https://github.com/m0nhawk/grafana_api/issues
Feel free to also ask questions on the tracker.
License
grafana_api
is licensed under the terms of the MIT License (see the file
LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
grafana_api-1.0.0.tar.gz
(17.4 kB
view hashes)
Built Distributions
Close
Hashes for grafana_api-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8687a79402221a6acbcf2436f0b6c3553dcde62044752abe26e0420ac81ab33 |
|
MD5 | e4fd3e3180886aee283a3f4fc396ed54 |
|
BLAKE2b-256 | 247dcc7647059b5e1cf0b5fea523fc727323b365da00b38768c6b455c99f87e6 |
Close
Hashes for grafana_api-1.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bf9c6095c912ded2a08e603955ffe400a262aafc0e115cf8da792a8854efc7a |
|
MD5 | 164aa3fd4d113c3d1f35b0b5d135cfdf |
|
BLAKE2b-256 | ba0204ce2dd7b42d627c7bb420fd93dc118d842bb12ae9a80a9e7bd50ca3d9fd |