requests-adapter-injector
This package provides a global mechanism for injection of Requests
transport adapters. Injection is done with the help of importhook
library and a .pth file as described
here.
You may probably want to use this package in a separate venv, where you would install
Python tools using Requests which you want to inject transport adapters into, along with
a package implementing desired adapters to inject. You may want to try pipx tool
to manage venvs for Python-based tools.
With that you would probably do pipx install <target-tool> && pipx inject <target-tool> <adapter-package>.
This package itself can be tested using the built-in test transport adapter, which can also serve as an example for authors of adapter packages.
$ python -mvenv venv
$ venv/bin/pip install requests-adapter-injector
$ venv/bin/python -c "import requests; r = requests.get('injector-test://some/url'); print(r.json())"
{'method': 'GET', 'url': 'injector-test://some/url', 'headers': {'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}, 'body': None}
Adapter packages have to declare one or more requests_adapter_injector.adapter entry_points, and are expected
to require this package, to have it installed automatically.
Note: this package will not work when installed as editable install because
src/requests_adapter_injector.pth is not installed then.
Existing transport adapter packages
None so far and some in planning.
Metadata
Release files for requests-adapter-injector 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| requests_adapter_injector-0.0.6.tar.gz | 5.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| requests_adapter_injector-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / requests_adapter_injector-0.0.6.tar.gz
| Download URL | requests_adapter_injector-0.0.6.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4e460689883003ae35a8ba0750f1479af37f082f0f78b104f0791a37e618147
|
|
BLAKE2b-256 checksum How to use checksums |
cd50250679ff7ed0576c749cc8b1e4d9153aaaeb41a99a02952186bc460dcd22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Release files / requests_adapter_injector-0.0.6-py3-none-any.whl
| Download URL | requests_adapter_injector-0.0.6-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d0f985b57adaeeb53e67035e475ccbd8cbecfb6bf85b014d94f5893a5d7478c
|
|
BLAKE2b-256 checksum How to use checksums |
466e3ac781f36e6c6661f497515816524322d1f5cfdaf86bc1f2b7ac1dad8c94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|
Security for requests-adapter-injector 0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.