A Python client for fetching public proxies from multiple sources.
Project description
Proxar
Proxar is a Python client for fetching public proxies from various online sources.
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.
Features
- Multi-Source Proxy Fetching: Retrieves proxies from several providers.
- Asynchronous Architecture: Built entirely on
asyncioandaiohttpfor efficient, non-blocking network operations. - Platform-Aware Storage: Uses
platformdirsto store proxies in the appropriate user-specific data directory on any OS, with an option for users to specify a custom path. - Simple Text-Based Storage: Saves proxies to simple
.txtfiles, making them easy to read, parse, and share. - Configurable Logging: Provides detailed logging for monitoring and debugging.
Installation
From PyPI (Recommended)
pip install proxar
From Source
You can set up Proxar by cloning the repository directly.
- Clone the repository:
git clone https://github.com/your-username/proxar.git cd proxar
- Install the project and its dependencies:
pip install -e .
- To install development dependencies like
mypyandruff, use:
pip install -e .[dev]
- To install development dependencies like
Usage
Here’s a basic example of how to use Proxar to fetch proxies:
import asyncio
from proxar import Proxar
async def main():
# Initialize Proxar
# You can optionally provide a custom storage path:
# proxar = Proxar(storage_path="/path/to/your/proxies")
proxar = Proxar()
try:
# Fetch proxies from all configured sources
await proxar.get_proxies()
print("Proxy fetching complete.")
print(f"Proxies saved to: {proxar.storage_path}")
except Exception as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
asyncio.run(main())
Configuration
Proxar is designed to work out-of-the-box with minimal configuration.
- Storage: By default, Proxar stores fetched proxies in a
proxardirectory inside your user data folder. You can override this by passing astorage_pathargument during initialization. - Logging: Logging levels and output can be configured within the library's logging module.
Dependencies
All project dependencies are managed via pyproject.toml.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request on GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proxar-0.2.0.tar.gz.
File metadata
- Download URL: proxar-0.2.0.tar.gz
- Upload date:
- Size: 83.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e022626fa82a7868c11617fda6272e3d5f6df93aece315a3140aa499cfcf6bc0
|
|
| MD5 |
6a4d811c821a199b62e9000d233a4b1d
|
|
| BLAKE2b-256 |
96a54e129261702c61a21bdef2a64e186113ceb7c9b2fb15f4c111f2afe33633
|
Provenance
The following attestation bundles were made for proxar-0.2.0.tar.gz:
Publisher:
release.yml on filming/proxar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proxar-0.2.0.tar.gz -
Subject digest:
e022626fa82a7868c11617fda6272e3d5f6df93aece315a3140aa499cfcf6bc0 - Sigstore transparency entry: 255619904
- Sigstore integration time:
-
Permalink:
filming/proxar@779e3b3eb8b5707183be75412acadcc0d11ad6ae -
Branch / Tag:
refs/heads/main - Owner: https://github.com/filming
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@779e3b3eb8b5707183be75412acadcc0d11ad6ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file proxar-0.2.0-py3-none-any.whl.
File metadata
- Download URL: proxar-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a7fe57321ff990f4dc0da7be2e59ccebd61d5a8827fef861bc93789c7458e90
|
|
| MD5 |
20863fea76d84dae4fb941e527ce8129
|
|
| BLAKE2b-256 |
8851513b82467c761a45b29974f1fab4cd55c9b0c56fdccd74fee021986a137e
|
Provenance
The following attestation bundles were made for proxar-0.2.0-py3-none-any.whl:
Publisher:
release.yml on filming/proxar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proxar-0.2.0-py3-none-any.whl -
Subject digest:
0a7fe57321ff990f4dc0da7be2e59ccebd61d5a8827fef861bc93789c7458e90 - Sigstore transparency entry: 255619906
- Sigstore integration time:
-
Permalink:
filming/proxar@779e3b3eb8b5707183be75412acadcc0d11ad6ae -
Branch / Tag:
refs/heads/main - Owner: https://github.com/filming
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@779e3b3eb8b5707183be75412acadcc0d11ad6ae -
Trigger Event:
push
-
Statement type: