Skip to main content

ProxyLog

A simple HTTP proxy server that logs all client/server communications, with some added features to parse the content such as automatic gunzipping, output colorization and known data “pretty” formatting, including XML, JSON, and YAML.

Project

TL;DR

Install:

$ pip install proxylog

Proxy http://www.example.com/ locally to http://localhost:8080/, log all transactions to a file and display them colorized and formatted on the console:

$ proxylog -r www.example.com:80 -p 8080 -o transactions.log -dcf

Display a previous log file colorized and formatted:

$ proxylog -i transactions.log -dcf

Colorizing

The colorizing is done via the Pygments package; proxylog’s --theme option is passed through to pygments, so any of the color themes that pygments supports can be used. Use the following command to list the available themes:

$ pygmentize -L styles

Formatting

“Formatting” refers to proxylog’s ability to re-format known data formats to a more human-friendly display, which when combined with colorization, can yield very readable data. HOWEVER, this does alter the actual data, so if you are using the data in any way, you should not use the “–format” flag.

Currently, the following formats are supported, with examples of how they are “prettified”:

  • XML:

    Input:

    <root  ><node   attr= "value">data</node>
      </root>

    Formatted output:

    <root>
      <node attr="value">data</node>
    </root>
  • JSON:

    Input:

    {"key": "value", "list": [3, "bar", null, "foo"]}

    Formatted output:

    {
      "key": "value",
      "list": [
        3,
        "bar",
        null,
        "foo"
      ]
    }
  • YAML:

    Input:

    {key: value, list: [3, bar, null, foo]}

    Formatted output:

    {
      "key": "value",
      "list": [
        3,
        "bar",
        null,
        "foo"
      ]
    }

Metadata

Release files for proxylog 0.6

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

Source distribution (sdist)

Source distribution for proxylog 0.6
File Size Uploaded Provenance
proxylog-0.6.tar.gz 23.0 kB Without provenance Details

Release files / proxylog-0.6.tar.gz

Download URL proxylog-0.6.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42018f4582dae0d70aeef1674035df807557670d056c61da07c0c57e8ac539e0
BLAKE2b-256 checksum
How to use checksums
5ff928b24027e268b3962a4f559533bb1c595077875c64ada541122caa2e970a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for proxylog 0.6

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