We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
credential
1 parent 042eed4 commit ac86da2Copy full SHA for ac86da2
HISTORY.md
@@ -3,6 +3,8 @@
3
# History
4
5
## Unreleased
6
+- Improved Python API authentication when using URL-based connectivity,
7
+ by respecting the `credential` keyword argument
8
9
## 0.4.0 (2024-10-16)
10
- Fixed folder argument issue
grafana_import/grafana.py
@@ -67,7 +67,7 @@ def __init__(self, **kwargs):
67
# Configure Grafana connectivity.
68
if "url" in kwargs:
69
self.grafana_api = GrafanaApi.GrafanaApi.from_url(
70
- url=kwargs["url"], credential=os.environ.get("GRAFANA_TOKEN")
+ url=kwargs["url"], credential=kwargs.get("credential", os.environ.get("GRAFANA_TOKEN"))
71
)
72
else:
73
config = {}
0 commit comments