Python Server Metrics
A very simple set of methods to collect metrics about your servers
Installation
To get the latest stable release from PyPi
pip install python-server-metrics
To get the latest commit from GitHub
pip install -e git+git://github.com/bitmazk/python-server-metrics.git#egg=server_metrics
Usage
Simply import the package and use it anywhere in your python code:
from server_metrics.memory import get_memory
from server_metrics.hard_disk import get_disk_usage
from server_metrics.postgresql import get_database_size
from server_metrics.cpu import get_cpu_usage
from server_metrics.memcached import get_memcached_usage
print get_memory()
print get_disk_usage('$HOME')
print get_database_size('my_role', 'my_db')
print get_cpu_usage('user')
print get_memcached_usage('~/memcached.sock')
Contribute
If you want to contribute to this project, please perform the following steps
# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 python-server-metrics
make develop
git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch
Metadata
Release files for python-server-metrics 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-server-metrics-0.2.2.tar.gz | 5.3 kB | Without provenance | Details for python-server-metrics-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_server_metrics-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for python_server_metrics-0.2.2-py3-none-any.whl |
Total release size: 11.2 kB
Release files / python-server-metrics-0.2.2.tar.gz
| Download URL | python-server-metrics-0.2.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a0872c36c3bdc298a7ed1cbe4ba3715cebf04855e965b1006d0516a49013fbd
|
|
BLAKE2b-256 checksum How to use checksums |
3197883028752f3f94f87407b5b52b9c1c91879ee9b5a4aabfd366719aceb616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11
|
Release files / python_server_metrics-0.2.2-py3-none-any.whl
| Download URL | python_server_metrics-0.2.2-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ba2bff810fbf5ce29858138fb380e2e38e3d345dcd42f9f2c397d51452c6c77
|
|
BLAKE2b-256 checksum How to use checksums |
20172d1af6b44a397bd972a66eefaf64d105c75a39752ecb44f68319af842a45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11
|
Security for python-server-metrics 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.