Skip to main content

Python module for easy integration with phantomas - PhantomJS-based modular web performance metrics collector

Latest Version Latest Version Supported Python versions https://travis-ci.org/macbre/phantomas-python.svg?branch=master

Install

In order to use this module you need phantomas “binary” installed in your system.

sudo make install

This will run npm install -g phantomas.

Module’s API

import json
from phantomas import Phantomas

results = Phantomas(
    url="http://example.com",
    exec_path="/my/path/to/phantomas",     # optional
    modules=['headers', 'requestsStats']
).run()

print('Generator: ' + results.get_generator())   # phantomas v1.9.0
print('\nMetrics: ' + json.dumps(results.get_metrics(), indent=True, sort_keys=True))
print('\nDomains: ' + json.dumps(results.get_offenders('domains'), indent=True))

# assertions
assert results.get_metric('notFound') == 0
assert results.get_metric('requests') < 5

More docs coming soon! Meanwhile please refer to example/example.py script.

Metadata

Release files for phantomas 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phantomas 0.2.3
File Size Uploaded Provenance
phantomas-0.2.3.tar.gz 5.5 kB Without provenance Details

Release files / phantomas-0.2.3.tar.gz

Download URL phantomas-0.2.3.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f2b0d384a1d5c24efc5bfb5846bad31323dcd61429865aee764c356bdab0b54a
BLAKE2b-256 checksum
How to use checksums
a2d76ece18c02597cbeb33046f0e5973817d746afa4e87e01074d102e1978926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for phantomas 0.2.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page