Monkey patches for setting user-agent header.
Project description
Monkey patches for setting user-agent header.
# Importing hooks automatically handles monkey patching
from setuseragent import hooks
# We can set to a specific value
hooks.set_user_agent("my-new-user-agent")
# Or we can set it with a package version
hooks.set_distribution('my-package')
# or using meta package name
hooks.set_distribution(__package__)
If using Django, can optionally set the site name as part of the package
# in settings.py
INSTALLED_APPS = [
...,
"setuseragent.django",
"django.contrib.sites",
]
USER_AGENT_DISTRIBUTION = __package__
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
setuseragent-0.3.0.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file setuseragent-0.3.0.tar.gz.
File metadata
- Download URL: setuseragent-0.3.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f166783615bdf20714e79bdcfc6f2aebfb44dc4f0dd1f80ba76069b6b4a7f8c
|
|
| MD5 |
cd3497583ef02d0636589adb66b69982
|
|
| BLAKE2b-256 |
0e30609af552d30eb0cdcce3ccdd4040d791232ad9970a0401ac870019b11c17
|
File details
Details for the file setuseragent-0.3.0-py3-none-any.whl.
File metadata
- Download URL: setuseragent-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da8cd3eaa387e7303a895d5a9f4503253a0139a4c4159a71b7987ec75601dd7
|
|
| MD5 |
8d7046f42b0363869f189b33ca01ad9d
|
|
| BLAKE2b-256 |
eb95f2e5d672dd3ba9f559bad3bd52fc878b0ab60e94772d4bfa6519f3b480e8
|