Coder Social home page Coder Social logo

grafana_api_client's Introduction

Very basic Grafana API wrapper. Supports Grafana v2.1.0

Usage:

>>> from grafana_api_client import GrafanaClient
>>> client = GrafanaClient(("admin", "admin"), host="127.0.0.1", port=3000) # or, alternatively:
>>> client = GrafanaClient("yourapikey", host="127.0.0.1", port=3000)
>>> client.org()
    {"id":1,"name":"Main Org."}
>>> client.org.replace(name="Your Org Ltd.")
    {"id":1,"name":"Your Org Ltd."}
>>> client.dashboards.db.create(dashboard={...}, overwrite=False)
    {"dashboard": {...}, "overwrite": False}

Please refer to the Grafana API Documentation for a list of available methods.

grafana_api_client's People

Contributors

htch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

grafana_api_client's Issues

Python 3 compatibility

Hi! I don't know how much work it would be, but what do you think about adding python3 compatibility?

Debianization

Hello.

I've done a basic debianization (ability to build 'deb' package from source) for grafana_api_client. It should be kept in 'debian' branch.

This repo has no 'debian' branch so I couldn't send pull request, but I will really appreciate if you accept changes.

They are here: https://github.com/amarao/grafana_api_client/tree/debian

grafana_api_client support user manager ?

grafana_api_client support user manager ?

same as grafana http api action

Add a new user to the actual organisation
POST /api/org/users

Updates the given user
PATCH /api/org/users/:userId

Delete user in actual organisation
DELETE /api/org/users/:userId

grafana_api_client can't get grafana

Because of some certificate issues I got:

('Connection aborted.', BadStatusLine("''",))

I've used requests to debug it, it pointed me to urllib3.
I found that adding a few additional args, solve the issue.

        http = urllib3.HTTPSConnectionPool(config['server']['url'], port=str(config['server']['port']),
                                                                 cert_reqs='CERT_NONE', assert_hostname=False)
        r = http.request('GET','/')

so adding cert_reqs='CERT_NONE', assert_hostname=False solves my issue.
How could I overwrite default grafana_api_client behaviour about connecting to a grafana host?

LICENCE

Hi,

There is no licence on your code can you precise it ? I may contibrute, but can't do it as is your project is closed source whithout any license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.