Skip to content

Commit 43dc65f

Browse files
committed
Rename Python package from grafana_api to grafana-client
1 parent d2e1520 commit 43dc65f

35 files changed

+49
-49
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen.
1818

1919
**Versions**
2020
- Grafana: [ ]
21-
- `grafana_api`: [ ]
21+
- `grafana-client`: [ ]
2222
- Authentication: [Basic] or [Token]
2323

2424
**Additional context**

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ jobs:
3030
shell: bash
3131
- name: Run tests
3232
run: |
33-
coverage run --source grafana_api -m xmlrunner discover -o test-reports
33+
coverage run --source grafana_client -m xmlrunner discover -o test-reports
3434
codecov
3535
shell: bash

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
grafana_api/version.py
2+
grafana_client/version.py
33

44
# Created by .ignore support plugin (hsz.mobi)
55
### Python template

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# grafana_api [![Github Actions Test](https://github.com/m0nhawk/grafana_api/workflows/Test/badge.svg)](https://github.com/m0nhawk/grafana_api/actions?query=workflow%3ATest) [![GitHub license](https://img.shields.io/github/license/m0nhawk/grafana_api.svg?style=flat-square)](https://github.com/m0nhawk/grafana_api/blob/master/LICENSE) [![Codecov](https://img.shields.io/codecov/c/gh/m0nhawk/grafana_api.svg?style=flat-square)](https://codecov.io/gh/m0nhawk/grafana_api/)
1+
# grafana-client [![Github Actions Test](https://github.com/m0nhawk/grafana_api/workflows/Test/badge.svg)](https://github.com/m0nhawk/grafana_api/actions?query=workflow%3ATest) [![GitHub license](https://img.shields.io/github/license/m0nhawk/grafana_api.svg?style=flat-square)](https://github.com/m0nhawk/grafana_api/blob/master/LICENSE) [![Codecov](https://img.shields.io/codecov/c/gh/m0nhawk/grafana_api.svg?style=flat-square)](https://codecov.io/gh/m0nhawk/grafana_api/)
22

3-
[![PyPI](https://img.shields.io/pypi/v/grafana_api.svg?style=flat-square)](https://pypi.org/project/grafana-api/) [![Conda](https://img.shields.io/conda/v/m0nhawk/grafana_api.svg?style=flat-square)](https://anaconda.org/m0nhawk/grafana_api)
3+
[![PyPI](https://img.shields.io/pypi/v/grafana-client.svg?style=flat-square)](https://pypi.org/project/grafana-api/) [![Conda](https://img.shields.io/conda/v/m0nhawk/grafana_api.svg?style=flat-square)](https://anaconda.org/m0nhawk/grafana_api)
44

55
## What is this library for?
66

@@ -15,39 +15,39 @@ You need Python 3 and only the `requests` library installed.
1515
Install the pip package:
1616

1717
```
18-
pip install -U grafana_api
18+
pip install -U grafana-client
1919
```
2020

2121
And then connect to your Grafana API endpoint:
2222

2323
```python
24-
from grafana_api.grafana_face import GrafanaFace
24+
from grafana_client.grafana_face import GrafanaFace
2525

26-
grafana_api = GrafanaFace(auth='abcde....', host='api.my-grafana-host.com')
26+
grafana = GrafanaFace(auth='abcde....', host='api.my-grafana-host.com')
2727

2828
# Create user
29-
user = grafana_api.admin.create_user({"name": "User", "email": "[email protected]", "login": "user", "password": "userpassword", "OrgId": 1})
29+
user = grafana.admin.create_user({"name": "User", "email": "[email protected]", "login": "user", "password": "userpassword", "OrgId": 1})
3030

3131
# Change user password
32-
user = grafana_api.admin.change_user_password(2, "newpassword")
32+
user = grafana.admin.change_user_password(2, "newpassword")
3333

3434
# Search dashboards based on tag
35-
grafana_api.search.search_dashboards(tag='applications')
35+
grafana.search.search_dashboards(tag='applications')
3636

3737
# Find a user by email
38-
user = grafana_api.users.find_user('[email protected]')
38+
user = grafana.users.find_user('[email protected]')
3939

4040
# Add user to team 2
41-
grafana_api.teams.add_team_member(2, user["id"])
41+
grafana.teams.add_team_member(2, user["id"])
4242

4343
# Create or update a dashboard
44-
grafana_api.dashboard.update_dashboard(dashboard={'dashboard': {...}, 'folderId': 0, 'overwrite': True})
44+
grafana.dashboard.update_dashboard(dashboard={'dashboard': {...}, 'folderId': 0, 'overwrite': True})
4545

4646
# Delete a dashboard by UID
47-
grafana_api.dashboard.delete_dashboard(dashboard_uid='abcdefgh')
47+
grafana.dashboard.delete_dashboard(dashboard_uid='abcdefgh')
4848

4949
# Create organization
50-
grafana_api.organization.create_organization({"name":"new_organization"})
50+
grafana.organization.create_organization({"name":"new_organization"})
5151
```
5252

5353

@@ -60,13 +60,13 @@ To use admin API you need to use basic auth [as stated here](https://grafana.com
6060
```python
6161
# Use basic authentication:
6262

63-
grafana_api = GrafanaFace(
63+
grafana = GrafanaFace(
6464
auth=("username","password"),
6565
host='api.my-grafana-host.com'
6666
)
6767

6868
# Use token
69-
grafana_api = GrafanaFace(
69+
grafana = GrafanaFace(
7070
auth='abcdetoken...',
7171
host='api.my-grafana-host.com'
7272
)
@@ -100,13 +100,13 @@ Work on API implementation still in progress.
100100

101101
## Issue tracker
102102

103-
Please report any bugs and enhancement ideas using the `grafana_api` issue tracker:
103+
Please report any bugs and enhancement ideas using the `grafana-client` issue tracker:
104104

105105
https://github.com/m0nhawk/grafana_api/issues
106106

107107
Feel free to also ask questions on the tracker.
108108

109109
## License
110110

111-
`grafana_api` is licensed under the terms of the MIT License (see the file
111+
`grafana-client` is licensed under the terms of the MIT License (see the file
112112
[LICENSE](LICENSE)).

conda/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% set version = data.get('version') %}
33

44
package:
5-
name: grafana_api
5+
name: grafana-client
66
version: {{ version }}
77

88
source:
@@ -23,8 +23,8 @@ requirements:
2323

2424
test:
2525
imports:
26-
- grafana_api
27-
- grafana_api.api
26+
- grafana_client
27+
- grafana_client.api
2828

2929
about:
3030
home: https://m0nhawk.github.io/grafana_api/

conda/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from setuptools import setup
2-
from grafana_api.version import version
2+
from grafana_client.version import version
33
setup(
44
version=version,
55
)

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
1919
<meta name="viewport" content="width=device-width">
2020

21-
<title>grafana_api</title>
21+
<title>grafana-client</title>
2222

2323
<!-- Flatdoc -->
2424
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)