proxar 0.1.2__tar.gz → 0.2.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.
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to Xify will be documented in this file.
4
4
 
5
+ ## v0.2.0 (2025-06-29)
6
+
7
+ ### Features
8
+
9
+ - add storage handler with platformdirs integration
10
+
5
11
  ## v0.1.2 (2025-06-29)
6
12
 
7
13
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxar
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: A Python client for fetching public proxies from multiple sources.
5
5
  Project-URL: Homepage, https://github.com/filming/proxar
6
6
  Project-URL: Repository, https://github.com/filming/proxar
@@ -39,6 +39,8 @@ Classifier: Programming Language :: Python :: 3.11
39
39
  Classifier: Programming Language :: Python :: 3.12
40
40
  Classifier: Programming Language :: Python :: 3.13
41
41
  Requires-Python: >=3.10
42
+ Requires-Dist: aiohttp>=3.12.13
43
+ Requires-Dist: platformdirs>=4.3.8
42
44
  Description-Content-Type: text/markdown
43
45
 
44
46
  # Proxar
@@ -4,11 +4,14 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "proxar"
7
- version = "0.1.2"
7
+ version = "0.2.0"
8
8
  description = "A Python client for fetching public proxies from multiple sources."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
- dependencies = []
11
+ dependencies = [
12
+ "aiohttp>=3.12.13",
13
+ "platformdirs>=4.3.8",
14
+ ]
12
15
  license = {file = "LICENSE"}
13
16
  authors = [
14
17
  {name = "Filming"}
@@ -0,0 +1,26 @@
1
+ import logging
2
+ from pathlib import Path
3
+
4
+ from .handlers.storage import StorageHandler
5
+
6
+ logger = logging.getLogger(__name__)
7
+ logger.addHandler(logging.NullHandler())
8
+
9
+
10
+ class Proxar:
11
+ """A Python client for fetching public proxies.
12
+
13
+ This library provides an asynchronous, easy-to-use interface to
14
+ retrieve fresh proxies, handling the complexities of web scraping
15
+ and source aggregation.
16
+ """
17
+
18
+ def __init__(self, storage_dir: str | Path | None = None):
19
+ """Initialize the Proxar instance.
20
+
21
+ Args:
22
+ storage_dir (str | Path | None): The path to store proxy
23
+ files. Defaults to None.
24
+ """
25
+ self.storage_manager = StorageHandler(storage_dir)
26
+ logger.info("Proxar has been initialized.")
@@ -0,0 +1,28 @@
1
+ import logging
2
+ from pathlib import Path
3
+
4
+ import platformdirs
5
+
6
+ logger = logging.getLogger(__name__)
7
+
8
+
9
+ class StorageHandler:
10
+ """Handle storage operations."""
11
+
12
+ def __init__(self, storage_dir: str | Path | None):
13
+ """Initialize the storage handler instance.
14
+
15
+ Args:
16
+ storage_dir (str | Path | None): The path to store proxy
17
+ files. If None, a default directory is used based on
18
+ the operating system.
19
+ """
20
+ # Set storage path and ensure its existence
21
+ if storage_dir is None:
22
+ self.storage_path = Path(platformdirs.user_data_dir("proxar"))
23
+ else:
24
+ self.storage_path = Path(storage_dir)
25
+
26
+ self.storage_path.mkdir(parents=True, exist_ok=True)
27
+
28
+ logger.debug("Storage handler has been initialized.")