Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pagopa-archive/io-report

collect and send to slack some data about the IO usage
https://github.com/pagopa-archive/io-report

Last synced: about 12 hours ago
JSON representation

collect and send to slack some data about the IO usage

Awesome Lists containing this project

README

        

# description
This tool collects some data about the IO usage and sends them to a Slack channel [every Monday at about 9.00am](.github/workflows/python-app.yml)

# setup
### mixpanel
To collect data from Mixpanel, it requires a [service token](https://eu.mixpanel.com/report/2460815/settings/#project/2460815/serviceaccounts)

It must be included as **env variable**
example:

`MIXPANEL_SERVICE_TOKEN`:`mp_service_token`

### slack
To send the reports to Slack, it requires the Slack web hook

It must be included as **env variable**
example:

`SLACK_WEB_HOOK`:`https://hooks.slack.com/services/xyz/zyx/123`

### how to add a report
- create you own report class by extending the base [Report](src/models/report.py)

```python
class FancyReport(Report):

def load_report(self) -> Union[str, None]:
return "42 - Answer to the Ultimate Question of Life, the Universe, and Everything"

life_section = SectionReports("✨ *Life Mystery*",
[FancyReport("most important answer")])
```
then add the `life_section` to the [sections list](src/main.py)

### requirements
It needs a Python interpreter version >= 3.5

Install requirements
`pip install -r requirements.txt`

# run
`python main.py`