{"id":15694469,"url":"https://github.com/macbre/phantomas-python","last_synced_at":"2025-05-08T22:22:11.552Z","repository":{"id":19818713,"uuid":"23079426","full_name":"macbre/phantomas-python","owner":"macbre","description":"Python module for easy integration with phantomas","archived":false,"fork":false,"pushed_at":"2018-03-05T01:32:12.000Z","size":35,"stargazers_count":7,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T09:38:35.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/phantomas","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macbre.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-18T17:06:12.000Z","updated_at":"2019-02-18T11:45:53.000Z","dependencies_parsed_at":"2022-08-25T21:40:55.190Z","dependency_job_id":null,"html_url":"https://github.com/macbre/phantomas-python","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fphantomas-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fphantomas-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fphantomas-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fphantomas-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macbre","download_url":"https://codeload.github.com/macbre/phantomas-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253155563,"owners_count":21862721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:59:01.842Z","updated_at":"2025-05-08T22:22:11.521Z","avatar_url":"https://github.com/macbre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python module for easy integration with `phantomas \u003chttps://github.com/macbre/phantomas\u003e`__ - PhantomJS-based modular web performance metrics collector\n\n.. image:: https://pypip.in/version/phantomas/badge.svg?style=flat\n    :target: https://pypi.python.org/pypi/phantomas/\n    :alt: Latest Version\n.. image:: https://pypip.in/download/phantomas/badge.svg?period=week\u0026style=flat\n    :target: https://pypi.python.org/pypi/phantomas/\n    :alt: Latest Version\n.. image:: https://pypip.in/py_versions/phantomas/badge.svg?style=flat\n    :target: https://pypi.python.org/pypi/phantomas/\n    :alt: Supported Python versions\n.. image:: https://travis-ci.org/macbre/phantomas-python.svg?branch=master\n    :target: https://travis-ci.org/macbre/phantomas-python\n\nInstall\n-------\n\nIn order to use this module you need `phantomas` \"binary\" installed in your system.\n\n::\n\n    sudo make install\n\nThis will run `npm install -g phantomas`.\n\nModule's API\n------------\n\n::\n\n    import json\n    from phantomas import Phantomas\n    \n    results = Phantomas(\n        url=\"http://example.com\",\n        exec_path=\"/my/path/to/phantomas\",     # optional\n        modules=['headers', 'requestsStats']\n    ).run()\n\n    print('Generator: ' + results.get_generator())   # phantomas v1.9.0\n    print('\\nMetrics: ' + json.dumps(results.get_metrics(), indent=True, sort_keys=True))\n    print('\\nDomains: ' + json.dumps(results.get_offenders('domains'), indent=True))\n\n    # assertions\n    assert results.get_metric('notFound') == 0\n    assert results.get_metric('requests') \u003c 5\n\nMore docs coming soon! Meanwhile please refer to `example/example.py` script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fphantomas-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacbre%2Fphantomas-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fphantomas-python/lists"}