semvec/pypi-packages huggingface dataset:
django-traffic-monitor 1.6
a Django application that eases to monitor server traffic.
License: MIT

======================
django-traffic-monitor
======================

django-traffic-monitor is a Django application that eases to monitor server traffic.

Quick start
-----------

1. install with pip::

    pip install django-traffic-monitor django-crontab

2. Add "traffic_monitor" and "django-crontab" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'django_crontab',
        'traffic_monitor',
    ]

3. Include the traffic_monitor URLconf in your project urls.py like this::

    urlpatterns += [
        url(r'^traffic/', include('traffic_monitor.urls')),
    ]

4. Run `python manage.py migrate` to create the traffic_monitor models.

5. Find out your server's network interface names using Linux command like ifconfig then set the name or names you wish to monitor in your project setting.::

    TRAFFIC_MONITOR_INTERFACE_NAMES = 'docker0,p2p1,eth0'

6. Email setting required for Django. If sending email in your project is currently working, no need to change it.::

    EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
    EMAIL_HOST = 'smtp.gmail.com',
    EMAIL_PORT = 587
    EMAIL_USE_TLS = True
    EMAIL_HOST_USER = 'your_email_id@gmail.com',
    EMAIL_HOST_PASSWORD = 'your_password,
    DEFAULT_FROM_EMAIL = 'your_email_id@gmail.com'

7. (Optional) Set more configurations if you want to change from default.::

    # Permission to use: superuser, staff, member, all
    TRAFFIC_MONITOR_PERMISSION = 'staff'

    # Template for traffic monitoring page
    TRAFFIC_MONITOR_TEMPLATE = 'traffic_monitor/show_traffic.html'

    # Alarm will be sent if daily traffic exceeds
    TRAFFIC_MONITOR_DAILY_ALARM_BYTES = 100 * 1024 * 1024 * 1024

    # Alarm will be sent if monthly traffic exceeds
    TRAFFIC_MONITOR_MONTHLY_ALARM_BYTES = 800 * 1024 * 1024 * 1024

    # Alarm From Email
    TRAFFIC_MONITOR_EMAIL_FROM = DEFAULT_FROM_EMAIL

    # Alarm Email To (comma seperated list, can be more than one)
    TRAFFIC_MONITOR_EMAIL_TO = [DEFAULT_FROM_EMAIL]

    # Set False if you do not want to get email
    TRAFFIC_MONITOR_ALARM_SEND_EMAIL = True

    # Subject of email
    TRAFFIC_MONITOR_ALARM_EMAIL_SUBJECT = 'Traffic limit alert'

    # If traffic limit exceeds, the next alarm will be sent only if the traffic exceeds threshold from previous alarm
    TRAFFIC_MONITOR_ALARM_BYTES_THRESHOLD = 10 * 1024 * 1024 * 1024

8. Add cronjob in your settings.py to collect traffic automatically. (i.e. run every 5 minutes)::

    CRONJOBS = [
        ('*/5 * * * *', 'traffic_monitor.tools.read_bytes', '>> /var/log/cronjob.log'),
    ]

9. Run following command to add CRONJOBS to your system crontab::

    python manage.py crontab add
msg2apps 1.1.0
A module for sending messages to communication apps
License: MIT

# msg2apps

A python module for sending messages to communication apps

## Support apps

### Wechat

Send a message(text only now) to Wecom.

Args:

- msg: Message you want to send.

- corpid: Each enterprise has a unique corpid. To obtain this information, you can view the "enterprise ID" under "My Company"-"Enterprise Information" in the management background (administrator rights are required).[link](https://work.weixin.qq.com/api/doc/90000/90135/90665#corpid)

- secret: Secret is the "key" used to ensure data security in enterprise applications. Each application has an independent access key. To ensure data security, secrets must not be leaked.[link](https://work.weixin.qq.com/api/doc/90000/90135/90665#secert)

- agentid: Each application has a unique agentid. In the management background -> "applications and applets" -> "applications", click on an application, you can see the agentid.[link](https://work.weixin.qq.com/api/doc/90000/90135/90665#agentid)

usage:

```python
from msg2apps import Wechat

Wechat(msg, corpid, secret, agentid)
```

### Telegram

Send a message(text only now) to specific account through bot.

Args:

- API_token: Each bot is given a unique authentication token [when it is created](https://core.telegram.org/bots#6-botfather). The token looks something like `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`, but we'll use simply **<token>** in this document instead. You can learn about obtaining tokens and generating new ones in [this document](https://core.telegram.org/bots#6-botfather).
- chat_id: Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)

usage:

```python
from msg2apps import Telegram

Telegram(msg, token, chat_id)
```

### Others
carrier.tnt 2021.3
TNT Web API Schemas Python Data Types library
License: MIT
Requires Python: >=3.6,<4.0

# py_tnt

TNT Python Data Structure generated from .xsd files with [generateDS](http://www.davekuhlman.org/generateDS.html) library

## Installation

```bash
pip install -f https://git.io/purplship py-tnt
```

TODO:

- Add tests to consolidate/ensure data structures generate proper TNT xml files
- Add more Generated Data Structures using TNT .xsd files

Contributions are welcome.