host utilities for django projects
Project description
django-hostutils
Django hostutils is a collection of utilities to provide information and metrics for hosts running a Django project. Data is available via included Bootstrap 5 templates and custom views/templates can also be used. Host metric data includes:
- Host OS, release, uptime
- CPU count and utilization
- Memory usage
- Disk partations and utilization
- Processes running, idle, sleeping
- Network interfaces and connections
Code Quality
Code Coverage:
Dashboard: https://coveralls.io/github/djangoaddicts/django-hostutils
Documentation
Full documentation can be found on: https://django-hostutils.readthedocs.io/en/latest/index.html
Documentation source files are available in the docs folder.
Installation
-
install via pip:
pip install django-hostutils
-
add the following to your INSTALLED_APPS in settings.py:
djangoaddicts.hostutils
-
add the following to your project-level urls.py:
path("hostutils/", include("djangoaddicts.hostutils.urls"), ),
Usage
Included Views
Several pages are available. If you have a Bootstrap 5 nav-menu you can add the following snippet in your navbar where appropriate:
{% include 'hostutils/bs5/snippets/hostutils_nav_menu.htm' %}
Individual pages can also be linked directly:
-
Host overview page:
{% url 'hostutils:host_details' %}
-
CPU stats page:
{% url 'hostutils:host_cpu' %}
-
Disk stats page:
{% url 'hostutils:host_disk' %}
-
Memory stats page:
{% url 'hostutils:host_memory' %}
-
Network stats page:
{% url 'hostutils:host_network' %}
-
Process stats page:
{% url 'hostutils:host_process' %}
Custom Views
Custom views/templates can be used to override the Bootstrap 5 templates provided by default for GUI views. In your views, import the desired views(s) from hostutils and create a class that inherits the desired hostutils view.
-
Here is an example of creating a custom view using ShowHost:
from djangoaddicts.hostutils.views import ShowHost class MyCustomShowHostView(ShowHost): template_name = "my_custom_template.html" title = "My Custom Title"
License
django-hostutils is licensed under the GNU-3 license (see the LICENSE file for details).
https://github.com/djangoaddicts/django-hostutils/blob/docs/LICENSE
Contributing
To contribute to django-hostutils, please see Contributing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_hostutils-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5abbe180fde68cb86960d4acb87fba9bc52a64ee0ee1822c2948deb28fd62e99 |
|
MD5 | d1cb3061c5f3e9bde228119a0c01d87c |
|
BLAKE2b-256 | cdfe78adf3e781bde659d27e9b538c86edcbbed0a112f2125ef93f1a54e28b65 |