Commit bf0168d7 authored by Oleg Kachur's avatar Oleg Kachur 👽 Committed by Pavel Kuzmenko
Browse files

Update README doc

parent 64e8e905
# Prometheus metrics for prozorro services
# Prometheus metrics lib.
``prozorro-metrics`` adds support for exporting prometheus metrics for prozorro services. It's implemented as python package with application wrapper
\ No newline at end of file
## Overview
Python library for sending metrics info to prometheus on Prozorro Sale services.
## Prometheus metrics for prozorro services
``prozorro-metrics`` adds support for exporting prometheus metrics for prozorro services.
It's implemented as python package with application wrapper.
## System requirements
* make
* docker
* docker-compose
## Example usage
```
from prozorro_sale metrics
def main():
"""
app_wrapper = metrics.ApplicationWrapper()
app_wrapper.add_web_app(create_application(), 80)
app_wrapper.add_coroutine(feed.fetch_auction_task())
app_wrapper.run_all()
if __name__ == '__main__':
main()
```
{: .language-python}
## Useful make jobs
### Help
List available `Makefile` commands
```
make help
```
### Build image for test run
```
make docker-build
```
### Launch tests run
```
make tests
```
### Clean up
To clean up docker containers (removes containers, networks, volumes)
```
make remove-compose
```
or just
```
make clean
```
### Build python package
```
build-wheel
```
### Publish python package
```
publish-wheel
```
### Linters
To run flake8:
```
make lint
```
All the settings for `flake8` can be customized in `.flake8` file
To run safety checks:
```
make safety
```
Check your installed dependencies for known security vulnerabilities
To find common security issues in Python code, run:
```
make bandit
```
### Auto Documentation
To generate sphinx docs
```bash
pip install -r requirements/docs.txt
make dev-docs
```
## Compatibility
Compatible and supported with python 3.9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment