proxar 0.1.2__py3-none-any.whl

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.
proxar/__init__.py ADDED
@@ -0,0 +1,17 @@
1
+ import logging
2
+
3
+ logger = logging.getLogger(__name__)
4
+ logger.addHandler(logging.NullHandler())
5
+
6
+
7
+ class Proxar:
8
+ """A Python client for fetching public proxies.
9
+
10
+ This library provides an asynchronous, easy-to-use interface to
11
+ retrieve fresh proxies, handling the complexities of web scraping
12
+ and source aggregation.
13
+ """
14
+
15
+ def __init__(self) -> None:
16
+ """Initialize the Proxar instance."""
17
+ logger.info("Proxar instance has been initialized.")
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: proxar
3
+ Version: 0.1.2
4
+ Summary: A Python client for fetching public proxies from multiple sources.
5
+ Project-URL: Homepage, https://github.com/filming/proxar
6
+ Project-URL: Repository, https://github.com/filming/proxar
7
+ Project-URL: Issues, https://github.com/filming/proxar/issues
8
+ Project-URL: Changelog, https://github.com/filming/proxar/blob/master/CHANGELOG.md
9
+ Author: Filming
10
+ License: MIT License
11
+
12
+ Copyright (c) 2024 filming
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ License-File: LICENSE
32
+ Keywords: asyncio,proxies,proxy,python,python3,web-scraping
33
+ Classifier: Development Status :: 3 - Alpha
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.10
38
+ Classifier: Programming Language :: Python :: 3.11
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Classifier: Programming Language :: Python :: 3.13
41
+ Requires-Python: >=3.10
42
+ Description-Content-Type: text/markdown
43
+
44
+ # Proxar
45
+
46
+ Proxar is a Python client for fetching public proxies from various online sources.
47
+
48
+ It uses an asynchronous architecture to retrieve fresh proxies from multiple providers, providing a stream of proxies for use in web scraping, data analysis, and other network-intensive tasks.
49
+
50
+ ---
51
+
52
+ ## Features
53
+
54
+ - **Multi-Source Proxy Fetching:** Retrieves proxies from several providers.
55
+ - **Asynchronous Architecture:** Built entirely on `asyncio` and `aiohttp` for efficient, non-blocking network operations.
56
+ - **Platform-Aware Storage:** Uses `platformdirs` to store proxies in the appropriate user-specific data directory on any OS, with an option for users to specify a custom path.
57
+ - **Simple Text-Based Storage:** Saves proxies to simple `.txt` files, making them easy to read, parse, and share.
58
+ - **Configurable Logging:** Provides detailed logging for monitoring and debugging.
59
+
60
+ ---
61
+
62
+ ## Installation
63
+
64
+ ### From PyPI (Recommended)
65
+
66
+ ```bash
67
+ pip install proxar
68
+ ```
69
+
70
+ ### From Source
71
+
72
+ You can set up Proxar by cloning the repository directly.
73
+
74
+ 1. Clone the repository:
75
+ ```bash
76
+ git clone https://github.com/your-username/proxar.git
77
+ cd proxar
78
+ ```
79
+ 2. Install the project and its dependencies:
80
+ ```bash
81
+ pip install -e .
82
+ ```
83
+ - To install development dependencies like `mypy` and `ruff`, use:
84
+ ```bash
85
+ pip install -e .[dev]
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Usage
91
+
92
+ Here’s a basic example of how to use Proxar to fetch proxies:
93
+
94
+ ```python
95
+ import asyncio
96
+ from proxar import Proxar
97
+
98
+ async def main():
99
+ # Initialize Proxar
100
+ # You can optionally provide a custom storage path:
101
+ # proxar = Proxar(storage_path="/path/to/your/proxies")
102
+ proxar = Proxar()
103
+
104
+ try:
105
+ # Fetch proxies from all configured sources
106
+ await proxar.get_proxies()
107
+ print("Proxy fetching complete.")
108
+ print(f"Proxies saved to: {proxar.storage_path}")
109
+
110
+ except Exception as e:
111
+ print(f"An error occurred: {e}")
112
+
113
+ if __name__ == "__main__":
114
+ asyncio.run(main())
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Configuration
120
+
121
+ Proxar is designed to work out-of-the-box with minimal configuration.
122
+
123
+ - **Storage:** By default, Proxar stores fetched proxies in a `proxar` directory inside your user data folder. You can override this by passing a `storage_path` argument during initialization.
124
+ - **Logging:** Logging levels and output can be configured within the library's logging module.
125
+
126
+ ---
127
+
128
+ ## Dependencies
129
+
130
+ All project dependencies are managed via [`pyproject.toml`](pyproject.toml).
131
+
132
+ ---
133
+
134
+ ## License
135
+
136
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
137
+
138
+ ---
139
+
140
+ ## Contributing
141
+
142
+ Contributions, bug reports, and feature requests are welcome!
143
+ Please open an issue or submit a pull request on [GitHub](https://github.com/filming/proxar).
@@ -0,0 +1,5 @@
1
+ proxar/__init__.py,sha256=X2ttuG_9U20-B_lQl4utBikcLmTgeSLo3jRuu06EOAs,477
2
+ proxar-0.1.2.dist-info/METADATA,sha256=LA_Ril7pb2efXIrdbRqECBNIRBBfGgg6Mi5pjCDJKaw,4952
3
+ proxar-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
+ proxar-0.1.2.dist-info/licenses/LICENSE,sha256=nADWCkou8O88YlL98Q9yVUXMJmusPE4LlQRrTv7S0Ts,1064
5
+ proxar-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 filming
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.