Skip to content

Commit

Permalink
Merge pull request #2 from m4n3dw0lf/master
Browse files Browse the repository at this point in the history
pygrafana version 0.2
  • Loading branch information
m4n3dw0lf authored Sep 5, 2017
2 parents b0b0507 + 1df50f8 commit bd74945
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
4 changes: 0 additions & 4 deletions MANIFEST

This file was deleted.

4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#misc
include LICENSE.txt
include README.md

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# pygrafana

Python Library to consume Grafana API.
Python Library to consume Grafana's API.


## Instalation
```
$ sudo pip install pygrafana
```

## First - Login into Grafana

```
Expand Down
12 changes: 8 additions & 4 deletions pygrafana/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/python2.7
#!/usr/bin/python2.7

# Copyrights (c) Sec4You Consulting.

# === Change log:
#
# 2017, Sep, Angelo Moura
# - Changed self.oim_server from os.getenv to a string
# - Removed unecessary imports

import requests
import yaml
from time import sleep
from os import getenv

class GrafanaManager(object):
def __init__(self, server, port):
Expand All @@ -17,7 +21,7 @@ def __init__(self, server, port):
self.zbx_pswd = ""
self.zbx_url = ""

self.oim_server = str(getenv('OIM_SERVER'))
self.oim_server = ""

def Login(self,username,password):
if not self.proxies:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
setup(
name = 'pygrafana',
packages = ['pygrafana'],
version = '0.1',
version = '0.2',
description = "Library to consume Grafana's API",
author = 'Angelo Moura',
author_email = 'angelo.moura@sec4you.com.br',
url = 'https://github.com/sec4you/pygrafana',
download_url = 'https://github.com/sec4you/pygrafana/archive/0.1.tar.gz',
download_url = 'https://github.com/sec4you/pygrafana/archive/0.2.tar.gz',
keywords = ['grafana','api'],
install_requires=['PyYAML>=3.12','requests>=2.18.4'],
classifiers = [],
Expand Down

0 comments on commit bd74945

Please sign in to comment.