File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 3
3
## in progress
4
4
5
5
6
+ ## 2.3.0 (2022-05-26)
7
+
8
+ * Make ` GrafanaApi(auth=) ` an optional argument. This makes it easier to
9
+ connect to Grafana instances that do not require authentication.
10
+
11
+
6
12
## 2.2.1 (2022-05-20)
7
13
8
14
* Fix annotations query string parameter ` dashboardId ` . Thanks, @richbon75 !
Original file line number Diff line number Diff line change 20
20
class GrafanaApi :
21
21
def __init__ (
22
22
self ,
23
- auth ,
23
+ auth = None ,
24
24
host = "localhost" ,
25
25
port = None ,
26
26
url_path_prefix = "" ,
Original file line number Diff line number Diff line change @@ -91,10 +91,11 @@ def construct_api_url():
91
91
self .url = construct_api_url ()
92
92
93
93
self .s = requests .Session ()
94
- if not isinstance (self .auth , tuple ):
95
- self .auth = TokenAuth (self .auth )
96
- else :
97
- self .auth = requests .auth .HTTPBasicAuth (* self .auth )
94
+ if self .auth is not None :
95
+ if not isinstance (self .auth , tuple ):
96
+ self .auth = TokenAuth (self .auth )
97
+ else :
98
+ self .auth = requests .auth .HTTPBasicAuth (* self .auth )
98
99
99
100
def __getattr__ (self , item ):
100
101
def __request_runnner (url , json = None , headers = None ):
You can’t perform that action at this time.
0 commit comments