Skip to main content

Yet another Python library for Grafana API

Project description

grafana_api Github Actions Test GitHub license Codecov

PyPI Conda

What is this library for?

Yet another Grafana API library for Python. Support Python 3 only.


You need Python 3 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='')

# Search dashboards based on tag'applications')

# Find a user by email
user = grafana_api.users.find_user('')

# 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


There are two ways to autheticate to grafana api. Either use api token or basic auth.

To use admin API you need to use basic auth as stated here

# Use basic authentication:

grafana_api = GrafanaFace(

# Use token
grafana_api = GrafanaFace(

Status of REST API realization

Work on API implementation still in progress.

API Status
Admin +
Alerting -
Alerting Notification Channels +
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:

Feel free to also ask questions on the tracker.


grafana_api is licensed under the terms of the MIT License (see the file LICENSE).

Project details

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.3.tar.gz (24.9 kB view hashes)

Uploaded source

Built Distribution

grafana_api-1.0.3-py2.py3-none-any.whl (26.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page