Skip to main content

Trace a HTTP request and gather the performance metrics.

Project description

tractus

License Github Workflow Python verions Format Implementation Version Quality

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

https://en.wiktionary.org/wiki/tractus

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tractus-0.8.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

tractus-0.8.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file tractus-0.8.0.tar.gz.

File metadata

  • Download URL: tractus-0.8.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for tractus-0.8.0.tar.gz
Algorithm Hash digest
SHA256 c27d5dbe183ec2d8c1c8a3bb56babf0ff1bc9e10bb28fd557b0e809fd384876e
MD5 a9503cf0a8806b6d092dc297d45c8657
BLAKE2b-256 66de67e852785f25d24e93d1cc74dd8191f922be0bdaa1579e9ae3acb3a91c8b

See more details on using hashes here.

File details

Details for the file tractus-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: tractus-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for tractus-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b9b876d9d405e973469b1355c63bd58fe39484086e1e8f937d0a6cc9e1892ba
MD5 f1c33e2bdd055ca3ea1a2e62a58cd93c
BLAKE2b-256 e4ef3e4e550b487fc606b2bc6e6a11e6f9288cde9772a8c4a6981234f7f1940c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page