faker.providers.user_agent

class faker.providers.user_agent.Provider(generator)

Bases: faker.providers.BaseProvider

android_platform_token()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.android_platform_token()
...
'Android 5.1.1'
'Android 4.4.4'
'Android 3.2.4'
'Android 2.3.4'
'Android 4.0.2'
chrome(version_from=13, version_to=63, build_from=800, build_to=899)
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.chrome()
...
'Mozilla/5.0 (Linux; Android 9) AppleWebKit/534.1 (KHTML, like Gecko) Chrome/47.0.890.0 Safari/534.1'
'Mozilla/5.0 (Linux; Android 4.4.1) AppleWebKit/536.1 (KHTML, like Gecko) Chrome/63.0.885.0 Safari/536.1'
'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_9_1) AppleWebKit/536.0 (KHTML, like Gecko) Chrome/48.0.842.0 Safari/536.0'
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/535.1 (KHTML, like Gecko) CriOS/30.0.866.0 Mobile/59E342 Safari/535.1'
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/532.2 (KHTML, like Gecko) CriOS/34.0.854.0 Mobile/96M947 Safari/532.2'
firefox()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.firefox()
...
'Mozilla/5.0 (X11; Linux i686; rv:1.9.5.20) Gecko/2018-09-12 22:48:44 Firefox/3.8'
'Mozilla/5.0 (X11; Linux i686; rv:1.9.6.20) Gecko/2020-08-21 06:23:56 Firefox/3.8'
'Mozilla/5.0 (Windows NT 6.0; tg-TJ; rv:1.9.2.20) Gecko/2013-02-16 12:29:30 Firefox/3.6.7'
'Mozilla/5.0 (X11; Linux x86_64; rv:1.9.5.20) Gecko/2014-10-01 21:27:30 Firefox/9.0'
'Mozilla/5.0 (Android 4.2.2; Mobile; rv:54.0) Gecko/54.0 Firefox/54.0'
internet_explorer()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.internet_explorer()
...
'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)'
'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/4.1)'
'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/4.0)'
'Mozilla/5.0 (compatible; MSIE 9.0; Windows 98; Trident/3.0)'
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)'
ios_platform_token()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ios_platform_token()
...
'iPad; CPU iPad OS 10_3_3 like Mac OS X'
'iPhone; CPU iPhone OS 5_1_1 like Mac OS X'
'iPad; CPU iPad OS 7_1_2 like Mac OS X'
'iPad; CPU iPad OS 6_1_6 like Mac OS X'
'iPhone; CPU iPhone OS 9_3_5 like Mac OS X'
linux_platform_token()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.linux_platform_token()
...
'X11; Linux x86_64'
'X11; Linux x86_64'
'X11; Linux i686'
'X11; Linux i686'
'X11; Linux x86_64'
linux_processor()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.linux_processor()
...
'x86_64'
'x86_64'
'i686'
'i686'
'x86_64'
mac_platform_token()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.mac_platform_token()
...
'Macintosh; U; PPC Mac OS X 10_11_0'
'Macintosh; PPC Mac OS X 10_12_6'
'Macintosh; U; PPC Mac OS X 10_9_7'
'Macintosh; PPC Mac OS X 10_8_8'
'Macintosh; Intel Mac OS X 10_7_1'
mac_processor()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.mac_processor()
...
'U; PPC'
'U; PPC'
'PPC'
'PPC'
'U; Intel'
opera()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.opera()
...
'Opera/9.61.(X11; Linux i686; tr-CY) Presto/2.9.190 Version/12.00'
'Opera/8.46.(X11; Linux x86_64; gu-IN) Presto/2.9.178 Version/10.00'
'Opera/8.49.(Windows NT 6.0; ne-NP) Presto/2.9.189 Version/12.00'
'Opera/8.55.(Windows NT 5.2; ts-ZA) Presto/2.9.175 Version/12.00'
'Opera/9.76.(Windows CE; nn-NO) Presto/2.9.177 Version/11.00'
safari()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.safari()
...
'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_1 like Mac OS X; iu-CA) AppleWebKit/534.49.4 (KHTML, like Gecko) Version/3.0.5 Mobile/8B115 Safari/6534.49.4'
'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_1 like Mac OS X; bn-BD) AppleWebKit/535.46.7 (KHTML, like Gecko) Version/4.0.5 Mobile/8B118 Safari/6535.46.7'
'Mozilla/5.0 (Windows; U; Windows NT 6.0) AppleWebKit/533.4.7 (KHTML, like Gecko) Version/4.0.1 Safari/533.4.7'
'Mozilla/5.0 (Windows; U; Windows CE) AppleWebKit/535.15.2 (KHTML, like Gecko) Version/4.0.5 Safari/535.15.2'
'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3 like Mac OS X; my-MM) AppleWebKit/535.36.5 (KHTML, like Gecko) Version/3.0.5 Mobile/8B112 Safari/6535.36.5'
user_agent()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.user_agent()
...
'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_1 like Mac OS X; unm-US) AppleWebKit/534.3.3 (KHTML, like Gecko) Version/3.0.5 Mobile/8B115 Safari/6534.3.3'
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/4.0)'
'Opera/9.88.(X11; Linux x86_64; hi-IN) Presto/2.9.171 Version/11.00'
'Opera/8.21.(Windows NT 6.2; ky-KG) Presto/2.9.168 Version/10.00'
'Opera/9.41.(Windows NT 5.2; sl-SI) Presto/2.9.179 Version/11.00'
windows_platform_token()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.windows_platform_token()
...
'Windows NT 6.1'
'Windows NT 6.0'
'Windows NT 5.0'
'Windows CE'
'Windows NT 5.01'