Skip to main content

apache-replay python package

Summary

Many pieces of software exist that can take an existing Apache httpd (or other) logs in the Common Log format or Combined log format, parse them, and then do something with them. I find it convenient to be able to do this with pure Python, using a package that can be installed from pip.

Features

  • Replay requests against a new server
  • Count log entries
  • Filter based on start and end dates
  • Print logs with a new canonical server URL

Installation

Installation is normal:

pip install apache-replay

Usage

Generate usage with:

apache-replay --help

Examples

Count the number of requests in November of 2018:

apache-replay --player count https://site.com/ /var/logs/httpd/access_log.2018-11*

Replay those same logs (only GET, HEAD, OPTIONS) against qa-mysite.com:

apache-replay https://qasite.com/ /var/logs/httpd/access_log.2018-11*

Only replay 2000 log entries from that file

apache-replay --count 2000 https://qasite.com/ /var/logs/httpd/access_log.2018-11*

License

MIT License

Metadata

Release files for apache-replay 0.0.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 apache-replay 0.0.3
File Size Uploaded
apache-replay-0.0.3.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apache-replay 0.0.3
File Interpreter ABI Platform
apache_replay-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / apache-replay-0.0.3.tar.gz

Download URL apache-replay-0.0.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f486f53416df30f9cd58c17982e55f4d9da5652bcb4c37f145c8b1f163a420bc
BLAKE2b-256 checksum
How to use checksums
82598c0efaa78959cad23e25e83d2a33acdd7a43b0d5baf35ed06090a96a4644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.1

Release files / apache_replay-0.0.3-py3-none-any.whl

Download URL apache_replay-0.0.3-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57077d92b14b0d3b34f4bd0bb351440f920183051dcdd63c1616fdfecf9216af
BLAKE2b-256 checksum
How to use checksums
66cfa49dfb71e2a000779220b142e38ddbeb5193f62661510cf6d7c6939d566e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.1

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

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