# `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!***
[![PyPI version](https://badge.fury.io/py/pyuseragents.svg)](https://pypi.org/project/pyuseragents/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/pyuseragents)](https://pypistats.org/packages/pyuseragents)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyuseragents)](https://pypi.org/project/pyuseragents/)
[![PyPI - Status](https://img.shields.io/pypi/status/pyuseragents)](https://pypi.org/project/pyuseragents/)
[![GitHub - License](https://img.shields.io/github/license/Animenosekai/useragents)](https://github.com/Animenosekai/useragents/blob/master/LICENSE)
[![GitHub Top language](https://img.shields.io/github/languages/top/Animenosekai/useragents)](https://github.com/Animenosekai/useragents)
[![CodeQL Checks Badge](https://github.com/Animenosekai/useragents/workflows/CodeQL%20Python%20Analysis/badge.svg)](https://github.com/Animenosekai/useragents/actions?query=workflow%3ACodeQL)
[![Pytest](https://github.com/Animenosekai/useragents/actions/workflows/pytest.yml/badge.svg)](https://github.com/Animenosekai/useragents/actions/workflows/pytest.yml)
![Code Size](https://img.shields.io/github/languages/code-size/Animenosekai/useragents)
![Repo Size](https://img.shields.io/github/repo-size/Animenosekai/useragents)
![Issues](https://img.shields.io/github/issues/Animenosekai/useragents)
## 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:
```bash
pip install pyuseragents
```
You can check if you successfully installed it by printing out its version:
```bash
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
```python
>>> 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](https://github.com/Animenosekai/useragents).
## Built With
No dependency is needed for this module
## Authors
* **Anime no Sekai** - *Initial work* - [Animenosekai](https://github.com/Animenosekai)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "https://github.com/Animenosekai/useragents",
"name": "pyuseragents",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,useragents,ua,user-agents,user-agent,http,request,header,http-header",
"author": "Anime no Sekai",
"author_email": "niichannomail@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/22/5e/5bf8a2542d27fe41c250409c97f103aad880a7450ca618e8063a192d993c/pyuseragents-1.0.5.tar.gz",
"platform": "",
"description": "# `useragents`\n\n### A Python module which does one thing: giving you a random User-Agent Header\n***Do not worry about sticking with a single user-agent for you HTTP requests ever again!***\n\n[![PyPI version](https://badge.fury.io/py/pyuseragents.svg)](https://pypi.org/project/pyuseragents/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pyuseragents)](https://pypistats.org/packages/pyuseragents)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyuseragents)](https://pypi.org/project/pyuseragents/)\n[![PyPI - Status](https://img.shields.io/pypi/status/pyuseragents)](https://pypi.org/project/pyuseragents/)\n[![GitHub - License](https://img.shields.io/github/license/Animenosekai/useragents)](https://github.com/Animenosekai/useragents/blob/master/LICENSE)\n[![GitHub Top language](https://img.shields.io/github/languages/top/Animenosekai/useragents)](https://github.com/Animenosekai/useragents)\n[![CodeQL Checks Badge](https://github.com/Animenosekai/useragents/workflows/CodeQL%20Python%20Analysis/badge.svg)](https://github.com/Animenosekai/useragents/actions?query=workflow%3ACodeQL)\n[![Pytest](https://github.com/Animenosekai/useragents/actions/workflows/pytest.yml/badge.svg)](https://github.com/Animenosekai/useragents/actions/workflows/pytest.yml)\n![Code Size](https://img.shields.io/github/languages/code-size/Animenosekai/useragents)\n![Repo Size](https://img.shields.io/github/repo-size/Animenosekai/useragents)\n![Issues](https://img.shields.io/github/issues/Animenosekai/useragents)\n\n\n## Getting Started\n\nThese 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.\n\n### Prerequisites\n\nYou will need to have Python installed on your computer to use this software\n\nAccording to Vermin, Python 3.0 or higher is needed to use `pyuseragents` even if it does work on Python 2.\n\nAlways check if your Python version works with `pyuseragents` before using it in production\n\n*Tested manually on `Python 2.7` and `Python 3.9`*\n\n*Tested automatically (CI) with Pytest on `Python 2.7`, `Python 3.0` and `Python 3.9`*\n\n### Installing\n\nYou can install it from PyPI with:\n\n```bash\npip install pyuseragents\n```\n\nYou can check if you successfully installed it by printing out its version:\n\n```bash\npython -c \"import pyuseragents; print(pyuseragents.__version__)\"\n# output:\npyuseragents v1.0\n```\n\n## List of User-Agents\n\nThe list of User-Agents headers has been crawled from various sources.\n\nThey are all available in the `pyuseragents/data/list.py` file.\n\n> The list being in a python module means that it will be preloaded by Python in memory for performance reasons.\n\n## Usage\n```python\n>>> import pyuseragents\n>>> headers = {\n \"User-Agent\": pyuseragents.random(),\n \"Content-Type\": \"application/json\",\n \"and so on...\"\n}\n>>> pyuseragents.random()\n\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36\"\n```\n\n## Deployment\n\nThis module should be stable but might contain bugs with edge-cases.\n\nFeel 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](https://github.com/Animenosekai/useragents).\n\n## Built With\nNo dependency is needed for this module\n\n## Authors\n\n* **Anime no Sekai** - *Initial work* - [Animenosekai](https://github.com/Animenosekai)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python module which does one thing: giving you a random User-Agent Header",
"version": "1.0.5",
"split_keywords": [
"python",
"useragents",
"ua",
"user-agents",
"user-agent",
"http",
"request",
"header",
"http-header"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "1e7fb9917724a0fdd17cfa084386d2e7",
"sha256": "c63d66f5d80fc08fd31027be754824292c795e2161c2ccce989d2ce2f23ae19b"
},
"downloads": -1,
"filename": "pyuseragents-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1e7fb9917724a0fdd17cfa084386d2e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 79839,
"upload_time": "2021-03-21T22:09:32",
"upload_time_iso_8601": "2021-03-21T22:09:32.085703Z",
"url": "https://files.pythonhosted.org/packages/c7/55/f4b835c5745a7d44ceca8c3e20b348ce2d782ac7e5b6d3a3c0e2be3f493e/pyuseragents-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "bb4504f994365ba39c1beffe46a31038",
"sha256": "7300024dcc04ed9ed4072d9aef7fbc18a832686b93acfb75e8835bbe0eb6aae6"
},
"downloads": -1,
"filename": "pyuseragents-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "bb4504f994365ba39c1beffe46a31038",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 76158,
"upload_time": "2021-03-21T22:09:33",
"upload_time_iso_8601": "2021-03-21T22:09:33.329103Z",
"url": "https://files.pythonhosted.org/packages/22/5e/5bf8a2542d27fe41c250409c97f103aad880a7450ca618e8063a192d993c/pyuseragents-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-03-21 22:09:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Animenosekai",
"github_project": "useragents",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyuseragents"
}