https://github.com/libranet/httpclient-logging
Monkeypatch httpclient's print-statement in python standard lib to use a logcall.
https://github.com/libranet/httpclient-logging
http-client logging monkeypatch print python
Last synced: about 1 month ago
JSON representation
Monkeypatch httpclient's print-statement in python standard lib to use a logcall.
- Host: GitHub
- URL: https://github.com/libranet/httpclient-logging
- Owner: libranet
- License: mit
- Created: 2023-03-04T00:35:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-01T14:52:55.000Z (5 months ago)
- Last Synced: 2025-11-27T21:17:47.855Z (about 2 months ago)
- Topics: http-client, logging, monkeypatch, print, python
- Language: Python
- Homepage: https://httpclient-logging.readthedocs.io
- Size: 1.47 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: docs/readme.md
- Contributing: docs/contributing.md
- Funding: .github/funding.yaml
- License: license.md
- Code of conduct: docs/code-of-conduct.md
- Codeowners: .github/CODEOWNERS
- Security: docs/security.md
Awesome Lists containing this project
README
[](https://github.com/libranet/httpclient-logging/actions/workflows/testing.yaml)
[](https://github.com/libranet/httpclient-logging/actions/workflows/linting.yaml)
[](https://httpclient-logging.readthedocs.io/en/latest/)
[](https://codecov.io/gh/libranet/httpclient-logging)
[](https://pypi.org/project/httpclient-logging/)
[](https://github.com/libranet/httpclient-logging/blob/main/docs/license.md)
## Installation
Install via pip:
```bash
> bin/pip install httpclient-logging
```
Install via uv:
```bash
> uv add httpclient-logging
```
Install via poetry:
```bash
> poetry add httpclient-logging
```
## Usage
The only thing left to do for you is the create a ``.env`` in the root of your project.
## Registered sitecustomize-entrypoint
The ``httpclient_logging.entrypoint``-function is registered as a ``sitecustomize``-entrypoint in our pyproject.toml_:
via uv:
``` toml
[project.entry-points."sitecustomize"]
httpclient_logging = "httpclient_logging.patch:configure"
```
via poetry:
``` toml
[tool.poetry.plugins]
[tool.poetry.plugins."sitecustomize"]
httpclient_logging = "httpclient_logging:entrypoint"
```
Sitecustomize and all its registered entrypoints will be executed at the start of *every* python-process.
For more information, please see [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)
## Compatibility
[](https://pypi.org/project/httpclient-logging/)
[](https://pypi.org/project/httpclient-logging/)
``httpclient-logging`` works on Python 3.8+, including PyPy3. Tested until Python 3.13,
## Notable dependencies
- [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)