Skip to main content

Monitaur Client Library

Project description

Monitaur Client Library

Tested with:

  1. Python 3.7.6
  2. Python 3.6.10

Development

Create and activate a virtual environment, and then install the requirements:

(env)$ pip install -r requirements-dev.txt

Tests:

(env)$ python -m pytest -p no:warnings --cov="monitaur"

or

(env)$ python -m pytest -p no:warnings --cov="monitaur" --cov-report html .

Run Flake8, Black, and isort:

(env)$ flake8 monitaur/ tests/
(env)$ black monitaur/ tests/
(env)$ isort monitaur/**/*.py tests/**/*.py

Docker

By using Docker, you can test the integration between the client-library and the back-end Django data-api.

First, log in to the GitLab Docker Registry for the data-api project:

$ docker login registry.gitlab.com/monitaur.ai/data-api -u monitaur-docker-registry -p K4-Xiy5QA8959ywXkPjS

Build and spin up the containers:

$ docker-compose up -d --build

Sanity check:

$ curl http://localhost:8008/ping/

{"ping": "pong!"}

Example Use

See _example/sample.py.

$ python3.7 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements.txt
(env)$ pip install -r _example/requirements.txt
(env)$ python _example/sample.py

History

0.1.0 (2020-01-22)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monitaur-0.1.0.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

monitaur-0.1.0-py3-none-any.whl (10.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page