Welcome to Netwell!
Installation
Python 3 is required:
$ pip install netwell
Quickstart
Given a netwell checkup file checks.py:
from netwell.checkers import URL, DNS, Port, Repo
URL('http://fsf.org') \
.redirects_to('http://www.fsf.org/') \
.title_matches('Free Software Foundation') \
.has_header('Content-Type', 'text/html;charset=utf-8')
Port('fsf.org', 443).ssl_valid_for(days=3000)
DNS('fsf.org', 'www.fsf.org').resolves_to('208.118.235.131')
Path('/').free_space(gb=1)
Path('/var/log/syslog').modified_within(hours=1)
Repo('/home/deploy/src/project').is_clean()
def custom_check(response, outcome):
data = response.json()
if data:
outcome.fail('Other data expected')
URL('http://httpbin.org/get').check_response(custom_check)
Then, run:
$ netwell /some/where/checks.py Checking that http://fsf.org redirects to http://www.fsf.org/... OK Checking that http://fsf.org title matches "Free Software Foundation"... OK Checking that http://fsf.org has header "Content-Type": "text/html;charset=utf-8"... OK Checking that SSL at fsf.org:443 is valid for at least 3000 days... ERROR ERROR: Not valid after 2016-10-13 Checking that fsf.org resolves to 208.118.235.131... OK Checking that www.fsf.org resolves to 208.118.235.131... OK Checking that / has 1 GB free space... ERROR ERROR: Only 0.5 GB free Checking that /var/log/syslog was modified after 2015-12-27 22:21:05.873355... OK Checking that http://httpbin.org/get passes custom_check... ERROR ERROR: Other data expected Checking that repository /home/deploy/src/project is clean... ERROR ERROR: Untracked files found
Use –quiet to only output the error messages, if any.
Metadata
Release files for netwell 0.4.0
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 | |
|---|---|---|---|---|
| netwell-0.4.0.tar.gz | 6.7 kB | Without provenance | Details |
Release files / netwell-0.4.0.tar.gz
| Download URL | netwell-0.4.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd6940614081790099b8fc1fdcf65cb930d54c647ed8bc9ba90dc781cf33926e
|
|
BLAKE2b-256 checksum How to use checksums |
9d014aacc00ffd2ed59595769e233baf1e72b3a4034ddabf65ff4ef34e1d487e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for netwell 0.4.0
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.