useragents
A Python module which does one thing: giving you a random User-Agent Header
Do not worry about sticking with a single user-agent for you HTTP requests ever again!
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
You will need to have Python installed on your computer to use this software
According to Vermin, Python 3.0 or higher is needed to use pyuseragents even if it does work on Python 2.
Always check if your Python version works with pyuseragents before using it in production
Tested manually on Python 2.7 and Python 3.9
Tested automatically (CI) with Pytest on Python 2.7, Python 3.0 and Python 3.9
Installing
You can install it from PyPI with:
pip install pyuseragents
You can check if you successfully installed it by printing out its version:
python -c "import pyuseragents; print(pyuseragents.__version__)"
# output:
pyuseragents v1.0
List of User-Agents
The list of User-Agents headers has been crawled from various sources.
They are all available in the pyuseragents/data/list.py file.
The list being in a python module means that it will be preloaded by Python in memory for performance reasons.
Usage
>>> import pyuseragents
>>> headers = {
"User-Agent": pyuseragents.random(),
"Content-Type": "application/json",
"and so on..."
}
>>> pyuseragents.random()
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"
Deployment
This module should be stable but might contain bugs with edge-cases.
Feel free to use it in production if you feel like it is suitable for your production and report any issue under the "Issues" section of the GitHub repository.
Built With
No dependency is needed for this module
Authors
- Anime no Sekai - Initial work - Animenosekai
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for pyuseragents 1.0.5
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 | Actions |
|---|---|---|---|---|
| pyuseragents-1.0.5.tar.gz | 76.2 kB | Without provenance | Details for pyuseragents-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyuseragents-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for pyuseragents-1.0.5-py3-none-any.whl |
Total release size: 156.0 kB
Release files / pyuseragents-1.0.5.tar.gz
| Download URL | pyuseragents-1.0.5.tar.gz |
|---|---|
| Size | 76.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7300024dcc04ed9ed4072d9aef7fbc18a832686b93acfb75e8835bbe0eb6aae6
|
|
BLAKE2b-256 checksum How to use checksums |
225e5bf8a2542d27fe41c250409c97f103aad880a7450ca618e8063a192d993c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / pyuseragents-1.0.5-py3-none-any.whl
| Download URL | pyuseragents-1.0.5-py3-none-any.whl |
|---|---|
| Size | 79.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c63d66f5d80fc08fd31027be754824292c795e2161c2ccce989d2ce2f23ae19b
|
|
BLAKE2b-256 checksum How to use checksums |
c755f4b835c5745a7d44ceca8c3e20b348ce2d782ac7e5b6d3a3c0e2be3f493e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for pyuseragents 1.0.5
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.