Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python module for easy integration with phantomas

Project Description

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


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(
    exec_path="/my/path/to/phantomas",     # optional
    modules=['headers', 'requestsStats']

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/ script.

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
phantomas-0.2.3.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source Jul 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting