tractus
Trace HTTP requests and gather performance metrics.
Install
pip install tractus
Usage
from tractus import Tracer
result = Tracer('https://google.com').trace()
print(f'Host IP: {result.ip}')
print(f'Status code: {result.status_code}')
print(f'DNS time: {result.dns} ms')
print(f'Handshake time: {result.handshake} ms')
print(f'First byte time: {result.first_byte} ms')
print(f'Full body time: {result.full_data} ms')
print(f'Body length: {result.data_length} bytes')
print(f'Headers length: {result.headers_length} bytes')
Helpers:
# Get result as json
result.as_json()
# Get result as dict
result.as_dict()
License
MIT
Name
Metadata
Release files for tractus 0.8.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 | |
|---|---|---|---|
| tractus-0.8.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tractus-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / tractus-0.8.0.tar.gz
| Download URL | tractus-0.8.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c27d5dbe183ec2d8c1c8a3bb56babf0ff1bc9e10bb28fd557b0e809fd384876e
|
|
BLAKE2b-256 checksum How to use checksums |
66de67e852785f25d24e93d1cc74dd8191f922be0bdaa1579e9ae3acb3a91c8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / tractus-0.8.0-py3-none-any.whl
| Download URL | tractus-0.8.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b9b876d9d405e973469b1355c63bd58fe39484086e1e8f937d0a6cc9e1892ba
|
|
BLAKE2b-256 checksum How to use checksums |
e4ef3e4e550b487fc606b2bc6e6a11e6f9288cde9772a8c4a6981234f7f1940c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|