proxar 0.1.2__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.
@@ -0,0 +1,76 @@
1
+ name: Release and Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ # Cancel pending runs of the workflow for the same branch
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ release:
15
+ # Prevent the workflow from running on its own commits
16
+ if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
17
+ runs-on: ubuntu-latest
18
+ name: "Bump version, create changelog, and publish"
19
+ permissions:
20
+ contents: write
21
+ id-token: write
22
+
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+ token: ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: "3.10"
34
+
35
+ - name: Install dependencies
36
+ run: |
37
+ python -m pip install --upgrade pip
38
+ pip install commitizen hatch
39
+
40
+ - name: Configure Git
41
+ run: |
42
+ git config --global user.name "github-actions[bot]"
43
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
44
+
45
+ - name: Create Bump and Changelog
46
+ id: cz
47
+ run: |
48
+ cz bump --changelog --yes
49
+ echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
50
+
51
+ - name: Push changes to main
52
+ run: git push origin main --tags
53
+
54
+ - name: Get Changelog Entry
55
+ id: changelog
56
+ run: |
57
+ CHANGELOG_CONTENT=$(awk '
58
+ /^## v/ { if (p) exit; p=1; next }
59
+ p { print }
60
+ ' CHANGELOG.md)
61
+
62
+ echo "content<<EOF" >> $GITHUB_OUTPUT
63
+ echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
64
+ echo "EOF" >> $GITHUB_OUTPUT
65
+
66
+ - name: Create GitHub Release
67
+ uses: softprops/action-gh-release@v2
68
+ with:
69
+ tag_name: ${{ steps.cz.outputs.tag }}
70
+ body: ${{ steps.changelog.outputs.content }}
71
+
72
+ - name: Build package
73
+ run: hatch build
74
+
75
+ - name: Publish to PyPI
76
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # macOS files
13
+ .DS_Store
14
+
15
+ # Personal
16
+ devarea/
@@ -0,0 +1,25 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: check-yaml
6
+ - id: end-of-file-fixer
7
+ - id: trailing-whitespace
8
+
9
+ - repo: https://github.com/astral-sh/ruff-pre-commit
10
+ rev: v0.12.1
11
+ hooks:
12
+ - id: ruff-format
13
+ - id: ruff
14
+ args: [--fix]
15
+
16
+ - repo: https://github.com/pre-commit/mirrors-mypy
17
+ rev: v1.16.1
18
+ hooks:
19
+ - id: mypy
20
+
21
+ - repo: https://github.com/commitizen-tools/commitizen
22
+ rev: v4.8.3
23
+ hooks:
24
+ - id: commitizen
25
+ stages: [commit-msg]
@@ -0,0 +1 @@
1
+ 3.10
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ All notable changes to Xify will be documented in this file.
4
+
5
+ ## v0.1.2 (2025-06-29)
6
+
7
+ ### Bug Fixes
8
+
9
+ - change gitignore order
10
+
11
+ ## v0.1.1 (2025-06-29)
12
+
13
+ ### Bug Fixes
14
+
15
+ - issue publishing package to pypi
16
+
17
+ ## v0.1.0 (2025-06-29)
18
+
19
+ ### Features
20
+
21
+ - add main class
proxar-0.1.2/LICENSE ADDED
@@ -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.
proxar-0.1.2/PKG-INFO ADDED
@@ -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).
proxar-0.1.2/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # Proxar
2
+
3
+ Proxar is a Python client for fetching public proxies from various online sources.
4
+
5
+ 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.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - **Multi-Source Proxy Fetching:** Retrieves proxies from several providers.
12
+ - **Asynchronous Architecture:** Built entirely on `asyncio` and `aiohttp` for efficient, non-blocking network operations.
13
+ - **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.
14
+ - **Simple Text-Based Storage:** Saves proxies to simple `.txt` files, making them easy to read, parse, and share.
15
+ - **Configurable Logging:** Provides detailed logging for monitoring and debugging.
16
+
17
+ ---
18
+
19
+ ## Installation
20
+
21
+ ### From PyPI (Recommended)
22
+
23
+ ```bash
24
+ pip install proxar
25
+ ```
26
+
27
+ ### From Source
28
+
29
+ You can set up Proxar by cloning the repository directly.
30
+
31
+ 1. Clone the repository:
32
+ ```bash
33
+ git clone https://github.com/your-username/proxar.git
34
+ cd proxar
35
+ ```
36
+ 2. Install the project and its dependencies:
37
+ ```bash
38
+ pip install -e .
39
+ ```
40
+ - To install development dependencies like `mypy` and `ruff`, use:
41
+ ```bash
42
+ pip install -e .[dev]
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Usage
48
+
49
+ Here’s a basic example of how to use Proxar to fetch proxies:
50
+
51
+ ```python
52
+ import asyncio
53
+ from proxar import Proxar
54
+
55
+ async def main():
56
+ # Initialize Proxar
57
+ # You can optionally provide a custom storage path:
58
+ # proxar = Proxar(storage_path="/path/to/your/proxies")
59
+ proxar = Proxar()
60
+
61
+ try:
62
+ # Fetch proxies from all configured sources
63
+ await proxar.get_proxies()
64
+ print("Proxy fetching complete.")
65
+ print(f"Proxies saved to: {proxar.storage_path}")
66
+
67
+ except Exception as e:
68
+ print(f"An error occurred: {e}")
69
+
70
+ if __name__ == "__main__":
71
+ asyncio.run(main())
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Configuration
77
+
78
+ Proxar is designed to work out-of-the-box with minimal configuration.
79
+
80
+ - **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.
81
+ - **Logging:** Logging levels and output can be configured within the library's logging module.
82
+
83
+ ---
84
+
85
+ ## Dependencies
86
+
87
+ All project dependencies are managed via [`pyproject.toml`](pyproject.toml).
88
+
89
+ ---
90
+
91
+ ## License
92
+
93
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
94
+
95
+ ---
96
+
97
+ ## Contributing
98
+
99
+ Contributions, bug reports, and feature requests are welcome!
100
+ Please open an issue or submit a pull request on [GitHub](https://github.com/filming/proxar).
@@ -0,0 +1,82 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "proxar"
7
+ version = "0.1.2"
8
+ description = "A Python client for fetching public proxies from multiple sources."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = []
12
+ license = {file = "LICENSE"}
13
+ authors = [
14
+ {name = "Filming"}
15
+ ]
16
+ keywords = ["python", "python3", "proxy", "proxies", "web-scraping", "asyncio"]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/filming/proxar"
30
+ Repository = "https://github.com/filming/proxar"
31
+ Issues = "https://github.com/filming/proxar/issues"
32
+ Changelog = "https://github.com/filming/proxar/blob/master/CHANGELOG.md"
33
+
34
+ [tool.ruff]
35
+ line-length = 88
36
+ target-version = "py310"
37
+ src = ["src"]
38
+
39
+ [tool.ruff.lint]
40
+ select = ["E", "F", "W", "I", "UP", "PL", "B", "SIM", "C90"]
41
+ ignore = []
42
+
43
+ [tool.ruff.lint.mccabe]
44
+ max-complexity = 10
45
+
46
+ [tool.ruff.lint.isort]
47
+ known-first-party = ["proxar"]
48
+
49
+ [tool.ruff.format]
50
+ quote-style = "double"
51
+
52
+ [tool.mypy]
53
+ strict = true
54
+ files = ["src"]
55
+ python_version = "3.10"
56
+
57
+ [tool.pdm.scripts]
58
+ format = "uv run ruff format src"
59
+ check_fix = "uv run ruff check --fix src"
60
+ type_check = "uv run mypy src"
61
+ clean = { composite = ["format", "check_fix", "type_check"] }
62
+
63
+ [tool.hatch.build.targets.wheel]
64
+ packages = ["src/proxar"]
65
+
66
+ [tool.commitizen]
67
+ name = "cz_conventional_commits"
68
+ tag_format = "v$version"
69
+ version_scheme = "pep440"
70
+ version_provider = "uv"
71
+ update_changelog_on_bump = true
72
+ changelog_message_builder_hook = "commitizen.hooks.conventional_commits_message_builder_hook"
73
+ change_type_map = { "feat" = "Features", "fix" = "Bug Fixes", "perf" = "Performance Improvements", "refactor" = "Code Refactoring", "build" = "Build System", "ci" = "Continuous Integration", "docs" = "Documentation", "style" = "Styles", "test" = "Tests", "chore" = "Chores" }
74
+
75
+ [dependency-groups]
76
+ dev = [
77
+ "commitizen>=4.8.3",
78
+ "mypy>=1.16.1",
79
+ "pdm>=2.25.3",
80
+ "pre-commit>=4.2.0",
81
+ "ruff>=0.12.1",
82
+ ]
@@ -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.")