Metadata-Version: 2.3
Name: setuseragent
Version: 0.6.0
Summary: Monkey patches for setting user-agent header.
Author: Paul Traylor
Author-email: Paul Traylor <kungfudiscomonkey@gmail.com>
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Monkey patches for setting user-agent header.

```python
# 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

```python
# in settings.py

INSTALLED_APPS = [
    ...,
    "setuseragent.django",
    "django.contrib.sites",
]

# Optionally can configure a specific package to lookup.
# otherwise defaults to the value of DJANGO_SETTINGS_MODULE
USER_AGENT_DISTRIBUTION = __package__
```
