import urllib3
= urllib3.request(
resp "GET",
"https://doi.org/10.1177/1465116507076430",
= {"accept": "application/vnd.citationstyles.csl+json"}
headers )
My goal is to use the urllib3 more regularly. It is a library that has no dependencies (see below)
Here are some examples of making http requests with urllib3.
resp.status
200
= resp.json()
doi_json 'author'] doi_json[
[{'given': 'Holger',
'family': 'Döring',
'sequence': 'first',
'affiliation': [{'name': 'Max Planck Institute for the Study of Societies, Germany,'}]}]
100] resp.data[:
b'{"indexed":{"date-parts":[[2025,7,8]],"date-time":"2025-07-08T00:11:55Z","timestamp":1751933515556,"'
Dependencies
urllib3 has no dependencies and the popular requests library uses urllib3.
Here is a documentation of the dependencies with uv.
uv init uv-project
cd uv-project
uv add urllib3
uv tree
Resolved 2 packages in 2ms
uv-project v0.1.0 └── urllib3 v2.2.3
uv remove urllib3
uv add requests
uv tree
Resolved 6 packages in 2ms
uv-project v0.1.0
└── requests v2.32.3
├── certifi v2024.8.30
├── charset-normalizer v3.4.0
├── idna v3.10 └── urllib3 v2.2.3