UAForge 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
uaforge-1.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bolgac
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
uaforge-1.1.0/PKG-INFO ADDED
@@ -0,0 +1,286 @@
1
+ Metadata-Version: 2.4
2
+ Name: UAForge
3
+ Version: 1.1.0
4
+ Summary: A powerful Python library and CLI tool for generating realistic, random user agent strings for Chrome, Firefox, and Opera browsers across multiple platforms.
5
+ Home-page: https://github.com/bolgac/UAForge
6
+ Author: bolgac
7
+ Author-email: bytearchsoft@gmail.com
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Software Development :: Testing
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.6
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: beautifulsoup4>=4.13.3
22
+ Requires-Dist: requests>=2.32.3
23
+ Requires-Dist: lxml>=6.0.2
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: license-file
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
34
+
35
+ # UAForge - UserAgent Generator
36
+
37
+ A powerful Python library and CLI tool for generating realistic, random user agent strings for Chrome, Firefox, and Opera browsers across multiple platforms.
38
+
39
+ ---
40
+
41
+ ## Features
42
+ - **Multi-browser support**: Generate user agents for Chrome, Firefox, and Opera
43
+ - **Cross-platform**: Supports Windows, Linux, macOS, Android, and iOS
44
+ - **Real version data**: Uses real browser version information from official sources
45
+ - **Realistic combinations**: Creates plausible user agent strings that mimic real browsers
46
+ - **SQLite database**: Stores version data locally for fast access
47
+ - **Auto-update**: Fetch latest browser versions from official sources
48
+ - **CLI interface**: Easy command-line usage
49
+ - **Python API**: Simple integration into Python projects
50
+
51
+ ---
52
+
53
+ ## Installation
54
+
55
+ ### From PyPI (Recommended)
56
+ ```bash
57
+ pip install uaforge
58
+ ```
59
+
60
+ ## Quick Start
61
+
62
+ ### Using the CLI
63
+
64
+ Initialize the database (first-time setup):
65
+ ```bash
66
+ uaforge --init
67
+ ```
68
+ Generate a single user agent:
69
+ ```bash
70
+ # Random browser user agent
71
+ uaforge
72
+
73
+ # Specific browser
74
+ uaforge --browser Chrome
75
+ uaforge --browser Firefox
76
+ uaforge --browser Opera
77
+
78
+ # Generate 10 Chrome user agents
79
+ uaforge --count 10 --browser Chrome
80
+
81
+ # Save to file
82
+ uaforge --count 50 --output useragents.txt --browser Firefox
83
+ ```
84
+
85
+ Update browser versions:
86
+ ```bash
87
+ # Update all versions
88
+ uaforge --update all
89
+
90
+ # Update specific browser
91
+ uaforge --update chrome
92
+ uaforge --update firefox
93
+ uaforge --update opera
94
+ uaforge --update android
95
+ uaforge --update mac
96
+ ```
97
+
98
+ ### Using Python API
99
+
100
+ ```bash
101
+ from uaforge import generate_user_agent, generate_multiple, update_versions
102
+
103
+ # Generate a single user agent
104
+ ua = generate_user_agent("Chrome")
105
+ print(ua)
106
+
107
+ # Generate multiple user agents
108
+ ua_list = generate_multiple(5)
109
+ for agent in ua_list:
110
+ print(agent)
111
+
112
+ # Update browser versions
113
+ update_versions("all")
114
+ ```
115
+
116
+ ### Advanced Usage
117
+ ```bash
118
+ from uaforge.core.user_agent import UserAgentGenerator
119
+
120
+ # Create a custom generator
121
+ generator = UserAgentGenerator()
122
+
123
+ # Generate specific types
124
+ chrome_agent = generator.create_useragent("Chrome")
125
+ firefox_agent = generator.create_useragent("Firefox")
126
+ opera_agent = generator.create_useragent("Opera")
127
+
128
+ # Get a batch of agents
129
+ agents = generator.get_list(100)
130
+ ```
131
+
132
+ ### Command Line Reference
133
+
134
+ | Option | Short | Description |
135
+ |--------|-------------|-------------|
136
+ |--count | -c | Number of user agents to generate (default: 1) |
137
+ |--browser | -b | Browser type: Chrome, Firefox, Opera, random (default: random) |
138
+ |--output | -o | Output file to save user agents |
139
+ |--update | -u | Update version information: all, chrome, firefox, opera, android, windows, linux, mac |
140
+ |--init | | Initialize database with initial data |
141
+ |--version | -v | Show version information |
142
+
143
+ ---
144
+
145
+ ## Examples
146
+ ```bash
147
+ # Show version
148
+ uaforge --version
149
+
150
+ # Initialize database
151
+ uaforge --init
152
+
153
+ # Update all versions
154
+ uaforge --update all
155
+
156
+ # Generate 5 Firefox user agents
157
+ uaforge --count 5 --browser Firefox
158
+
159
+ # Generate 100 random user agents and save to file
160
+ uaforge --count 100 --output agents.txt
161
+
162
+ # Generate a single Chrome user agent
163
+ uaforge --browser Chrome
164
+ ```
165
+
166
+ ## Database Structure
167
+ - **Browser versions:** Chrome, Firefox, Opera version history
168
+ - **Platform information:** Windows, Linux, macOS, Android system strings
169
+ - **Version types:** Architecture and build types for each platform
170
+ - **Release dates:** Version release information
171
+ - **Database location:** ~/.useragent_generator/data/useragent.db
172
+
173
+ ---
174
+
175
+ ## Supported Platforms and Browsers
176
+
177
+ **Browsers**
178
+ - Google Chrome (desktop & mobile)
179
+ - Mozilla Firefox (desktop & mobile)
180
+ - Opera (desktop & mobile)
181
+
182
+ **Operating Systems**
183
+ - Windows (NT 6.0 to NT 10.0)
184
+ - Linux (X11 variants)
185
+ - macOS (10.15 to 14.0)
186
+ - Android (10 to 14)
187
+ - iOS (simulated via macOS strings)
188
+
189
+ **Architectures**
190
+ - Windows: x64, WOW64
191
+ - Linux: i686, x86_64
192
+ - Android: armv7l, armv8l
193
+
194
+ ---
195
+
196
+ ## Project Structure
197
+ ```bash
198
+ uaforge/
199
+ ├── core/
200
+ │ ├── __init__.py # init file
201
+ │ ├── database.py # SQLite database operations
202
+ │ ├── user_agent.py # Main user agent generator
203
+ │ ├── version_fetcher.py # Fetch versions from web
204
+ │ └── version_updater.py # Update database with new versions
205
+ ├── data/
206
+ │ └── useragent.db # SQLite database file
207
+ ├── cli.py # Command-line interface
208
+ ├── utils.py # Utility functions
209
+ └── __init__.py # Package exports
210
+ ```
211
+
212
+ ## Development
213
+ ```bash
214
+ # Clone the repository
215
+ git clone https://github.com/bolgac/uaforge.git
216
+ cd uaforge
217
+
218
+ # Install in development mode
219
+ pip install -e .[dev]
220
+
221
+ # Run tests
222
+ python -m pytest
223
+
224
+ # Build distribution
225
+ python setup.py sdist bdist_wheel
226
+ ```
227
+
228
+ ## Common Issues and Solutions
229
+ ### Database Not Found
230
+
231
+ ```bash
232
+ uaforge --init
233
+ ```
234
+ ### Empty User Agents
235
+
236
+ ```bash
237
+ uaforge --update all
238
+ ```
239
+ ### Network Issues
240
+ - Check your internet connection
241
+ - Use --init for offline mode with sample data
242
+ - Configure proxy if needed
243
+
244
+ ### Permission Errors
245
+ - Run with appropriate permissions
246
+ - Check database file permissions
247
+
248
+ ---
249
+
250
+ ## Contributing
251
+
252
+ Feel free to fork this project, submit PRs, or suggest features via GitHub Issues!
253
+
254
+ We welcome contributions of all kinds:
255
+ - Bug reports and fixes
256
+ - New features and enhancements
257
+ - Documentation improvements
258
+ - Testing and code quality improvements
259
+
260
+ ---
261
+
262
+ ## 📬 Contact
263
+
264
+ - GitHub Issues – for bugs and feedback
265
+ - Email – `bytearchsoft@gmail.com` (for business inquiries or sponsorships)
266
+
267
+ ---
268
+
269
+ ## License
270
+ This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.
271
+
272
+ ---
273
+
274
+ ## Acknowledgments
275
+ - Browser version data from official sources:
276
+
277
+ - [Chrome](https://chromedriver.storage.googleapis.com/)
278
+ - [Firefox](https://www.mozilla.org/en-US/firefox/releases/)
279
+ - [Android](https://tr.wikipedia.org/wiki/Android)
280
+ - [Opera](https://blogs.opera.com/desktop/)
281
+ - [Mac-Wikipedia](https://en.wikipedia.org/wiki/)
282
+
283
+ - Inspired by various user agent generation libraries
284
+ - Contributors and testers
285
+
286
+ ---
@@ -0,0 +1,252 @@
1
+ # UAForge - UserAgent Generator
2
+
3
+ A powerful Python library and CLI tool for generating realistic, random user agent strings for Chrome, Firefox, and Opera browsers across multiple platforms.
4
+
5
+ ---
6
+
7
+ ## Features
8
+ - **Multi-browser support**: Generate user agents for Chrome, Firefox, and Opera
9
+ - **Cross-platform**: Supports Windows, Linux, macOS, Android, and iOS
10
+ - **Real version data**: Uses real browser version information from official sources
11
+ - **Realistic combinations**: Creates plausible user agent strings that mimic real browsers
12
+ - **SQLite database**: Stores version data locally for fast access
13
+ - **Auto-update**: Fetch latest browser versions from official sources
14
+ - **CLI interface**: Easy command-line usage
15
+ - **Python API**: Simple integration into Python projects
16
+
17
+ ---
18
+
19
+ ## Installation
20
+
21
+ ### From PyPI (Recommended)
22
+ ```bash
23
+ pip install uaforge
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ ### Using the CLI
29
+
30
+ Initialize the database (first-time setup):
31
+ ```bash
32
+ uaforge --init
33
+ ```
34
+ Generate a single user agent:
35
+ ```bash
36
+ # Random browser user agent
37
+ uaforge
38
+
39
+ # Specific browser
40
+ uaforge --browser Chrome
41
+ uaforge --browser Firefox
42
+ uaforge --browser Opera
43
+
44
+ # Generate 10 Chrome user agents
45
+ uaforge --count 10 --browser Chrome
46
+
47
+ # Save to file
48
+ uaforge --count 50 --output useragents.txt --browser Firefox
49
+ ```
50
+
51
+ Update browser versions:
52
+ ```bash
53
+ # Update all versions
54
+ uaforge --update all
55
+
56
+ # Update specific browser
57
+ uaforge --update chrome
58
+ uaforge --update firefox
59
+ uaforge --update opera
60
+ uaforge --update android
61
+ uaforge --update mac
62
+ ```
63
+
64
+ ### Using Python API
65
+
66
+ ```bash
67
+ from uaforge import generate_user_agent, generate_multiple, update_versions
68
+
69
+ # Generate a single user agent
70
+ ua = generate_user_agent("Chrome")
71
+ print(ua)
72
+
73
+ # Generate multiple user agents
74
+ ua_list = generate_multiple(5)
75
+ for agent in ua_list:
76
+ print(agent)
77
+
78
+ # Update browser versions
79
+ update_versions("all")
80
+ ```
81
+
82
+ ### Advanced Usage
83
+ ```bash
84
+ from uaforge.core.user_agent import UserAgentGenerator
85
+
86
+ # Create a custom generator
87
+ generator = UserAgentGenerator()
88
+
89
+ # Generate specific types
90
+ chrome_agent = generator.create_useragent("Chrome")
91
+ firefox_agent = generator.create_useragent("Firefox")
92
+ opera_agent = generator.create_useragent("Opera")
93
+
94
+ # Get a batch of agents
95
+ agents = generator.get_list(100)
96
+ ```
97
+
98
+ ### Command Line Reference
99
+
100
+ | Option | Short | Description |
101
+ |--------|-------------|-------------|
102
+ |--count | -c | Number of user agents to generate (default: 1) |
103
+ |--browser | -b | Browser type: Chrome, Firefox, Opera, random (default: random) |
104
+ |--output | -o | Output file to save user agents |
105
+ |--update | -u | Update version information: all, chrome, firefox, opera, android, windows, linux, mac |
106
+ |--init | | Initialize database with initial data |
107
+ |--version | -v | Show version information |
108
+
109
+ ---
110
+
111
+ ## Examples
112
+ ```bash
113
+ # Show version
114
+ uaforge --version
115
+
116
+ # Initialize database
117
+ uaforge --init
118
+
119
+ # Update all versions
120
+ uaforge --update all
121
+
122
+ # Generate 5 Firefox user agents
123
+ uaforge --count 5 --browser Firefox
124
+
125
+ # Generate 100 random user agents and save to file
126
+ uaforge --count 100 --output agents.txt
127
+
128
+ # Generate a single Chrome user agent
129
+ uaforge --browser Chrome
130
+ ```
131
+
132
+ ## Database Structure
133
+ - **Browser versions:** Chrome, Firefox, Opera version history
134
+ - **Platform information:** Windows, Linux, macOS, Android system strings
135
+ - **Version types:** Architecture and build types for each platform
136
+ - **Release dates:** Version release information
137
+ - **Database location:** ~/.useragent_generator/data/useragent.db
138
+
139
+ ---
140
+
141
+ ## Supported Platforms and Browsers
142
+
143
+ **Browsers**
144
+ - Google Chrome (desktop & mobile)
145
+ - Mozilla Firefox (desktop & mobile)
146
+ - Opera (desktop & mobile)
147
+
148
+ **Operating Systems**
149
+ - Windows (NT 6.0 to NT 10.0)
150
+ - Linux (X11 variants)
151
+ - macOS (10.15 to 14.0)
152
+ - Android (10 to 14)
153
+ - iOS (simulated via macOS strings)
154
+
155
+ **Architectures**
156
+ - Windows: x64, WOW64
157
+ - Linux: i686, x86_64
158
+ - Android: armv7l, armv8l
159
+
160
+ ---
161
+
162
+ ## Project Structure
163
+ ```bash
164
+ uaforge/
165
+ ├── core/
166
+ │ ├── __init__.py # init file
167
+ │ ├── database.py # SQLite database operations
168
+ │ ├── user_agent.py # Main user agent generator
169
+ │ ├── version_fetcher.py # Fetch versions from web
170
+ │ └── version_updater.py # Update database with new versions
171
+ ├── data/
172
+ │ └── useragent.db # SQLite database file
173
+ ├── cli.py # Command-line interface
174
+ ├── utils.py # Utility functions
175
+ └── __init__.py # Package exports
176
+ ```
177
+
178
+ ## Development
179
+ ```bash
180
+ # Clone the repository
181
+ git clone https://github.com/bolgac/uaforge.git
182
+ cd uaforge
183
+
184
+ # Install in development mode
185
+ pip install -e .[dev]
186
+
187
+ # Run tests
188
+ python -m pytest
189
+
190
+ # Build distribution
191
+ python setup.py sdist bdist_wheel
192
+ ```
193
+
194
+ ## Common Issues and Solutions
195
+ ### Database Not Found
196
+
197
+ ```bash
198
+ uaforge --init
199
+ ```
200
+ ### Empty User Agents
201
+
202
+ ```bash
203
+ uaforge --update all
204
+ ```
205
+ ### Network Issues
206
+ - Check your internet connection
207
+ - Use --init for offline mode with sample data
208
+ - Configure proxy if needed
209
+
210
+ ### Permission Errors
211
+ - Run with appropriate permissions
212
+ - Check database file permissions
213
+
214
+ ---
215
+
216
+ ## Contributing
217
+
218
+ Feel free to fork this project, submit PRs, or suggest features via GitHub Issues!
219
+
220
+ We welcome contributions of all kinds:
221
+ - Bug reports and fixes
222
+ - New features and enhancements
223
+ - Documentation improvements
224
+ - Testing and code quality improvements
225
+
226
+ ---
227
+
228
+ ## 📬 Contact
229
+
230
+ - GitHub Issues – for bugs and feedback
231
+ - Email – `bytearchsoft@gmail.com` (for business inquiries or sponsorships)
232
+
233
+ ---
234
+
235
+ ## License
236
+ This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.
237
+
238
+ ---
239
+
240
+ ## Acknowledgments
241
+ - Browser version data from official sources:
242
+
243
+ - [Chrome](https://chromedriver.storage.googleapis.com/)
244
+ - [Firefox](https://www.mozilla.org/en-US/firefox/releases/)
245
+ - [Android](https://tr.wikipedia.org/wiki/Android)
246
+ - [Opera](https://blogs.opera.com/desktop/)
247
+ - [Mac-Wikipedia](https://en.wikipedia.org/wiki/)
248
+
249
+ - Inspired by various user agent generation libraries
250
+ - Contributors and testers
251
+
252
+ ---