
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
useragents
Do not worry about sticking with a single user-agent for you HTTP requests ever again!
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.
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
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
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.
>>> 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"
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.
No dependency is needed for this module
This project is licensed under the MIT License - see the LICENSE file for details
FAQs
A Python module which does one thing: giving you a random User-Agent Header
We found that pyuseragents demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.