石墨石榴树皮图书馆
grafana-api的Python项目详细描述
格拉法纳API
这个图书馆是干什么的?
另一个用于python的grafana api库。支持2和3个python版本。
要求
您需要python的第二或第三个版本,并且只需要安装requests
库。
快速启动
安装pip包:
pip install -U grafana_api
然后连接到Grafana API端点:
fromgrafana_api.grafana_faceimportGrafanaFacegrafana_api=GrafanaFace(auth='abcde....',host='api.my-grafana-host.com')# Search dashboards based on taggrafana_api.search.search_dashboards(tag='applications')# Find a user by emailuser=grafana_api.users.find_user('test@test.com')# Add user to team 2grafana_api.teams.add_team_member(2,user["id"])# Create or update a dashboardgrafana_api.dashboard.update_dashboard(dashboard={'dashboard':{...},'folderId':0,'overwrite':True})# Delete a dashboard by UIDgrafana_api.dashboard.delete_dashboard(dashboard_uid='abcdefgh')
rest api实现状态
关于api实现的工作仍在进行中。
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 | + |
问题跟踪程序
请使用grafana_api
问题跟踪程序报告任何错误和增强想法:
https://github.com/m0nhawk/grafana_api/issues
也可以在跟踪器上提问。
许可证
grafana_api
根据mit许可的条款获得许可(参见文件
LICENSE)。