Skip to main content

forge-useragent

Forked version of fake-useragent.

  • Supports Python 3.10 or higher

Introduction

Installation

# pypi name change to `forge-useragent`
pip install forge-useragent

# check version
pip list | grep -i forge-useragent
python -c "import fake_useragent; print(fake_useragent.__version__)"

Usage

package name is same fake_useragent:

from fake_useragent import UserAgent
ua = UserAgent()

# Get a random browser user-agent string
print(ua.random)

# Or get user-agent string from a specific browser
print(ua.chrome)
print(ua.firefox)
print(ua.safari)
print(ua.opera)
print(ua.edge)

print(ua['Chrome'])

More

# names are case-sensitive!
from fake_useragent import UserAgent

# browsers
ua = UserAgent(browsers=['Edge', 'Chrome'])
ua.random

# os
ua = UserAgent(os='Linux')
ua.random

# platforms: desktop / mobile / tablet
ua = UserAgent(platforms='mobile')
ua.random

from fake_useragent import UserAgent
ua = UserAgent(platforms='desktop')
ua.random

# get only user agents that have a minimum version of 120.0:
from fake_useragent import UserAgent
ua = UserAgent(min_version=120.0)
ua.random

User-agent Python Dictionary

Warning Raw JSON objects (in a Python dictionaries) are returned "as is". Meaning, this data structure could change in the future!

Be aware that these "get" properties below might not return the same key/value pairs in the future. Use ua.random or alike as mentioned above, if you want to use a stable interface.

INCOMPATIBLE PROPERTY NAME CHANGED!

from fake_useragent import UserAgent
ua = UserAgent()

# Random user-agent dictionary (object)
ua.get_random # old version: ua.getRandom

# More get properties:
ua.get_f_irefox # ua.getFirefox
ua.get_chrome   # ua.getChrome
ua.get_safari   # ua.getSafari
ua.get_edge     # ua.getEdge

# And a method with an argument.
ua.get_browser('firefox') # ua.getBrowser('firefox')

Metadata

Release files for forge-useragent 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-useragent 3.0.1
File Size Uploaded
forge_useragent-3.0.1.tar.gz 276.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forge-useragent 3.0.1
File Interpreter ABI Platform
forge_useragent-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 554.0 kB

Release files / forge_useragent-3.0.1.tar.gz

Download URL forge_useragent-3.0.1.tar.gz
Size 276.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5f8d38941126eeb22717d38a4bb0bcff66051ad232e8096f63a6f2415c1c0fca
BLAKE2b-256 checksum
How to use checksums
dca2a2e1574d2721ba1e33d4d24761172207db8ea0cab510fca1352ac80f76d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 19, 2026.

Transparency log

Release files / forge_useragent-3.0.1-py3-none-any.whl

Download URL forge_useragent-3.0.1-py3-none-any.whl
Size 277.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7c814706e94129643d0c1159d6d244a6d2fa07ab9f37cb716cdceff581c9a31
BLAKE2b-256 checksum
How to use checksums
1cec0b3c9d0e3cd4f3e5cf174762428db0cd55acfe6e6211095b4d9dd8f41064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page