Skip to main content

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 asyncio and aiohttp for efficient, non-blocking network operations.
  • 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.
  • Simple Text-Based Storage: Saves proxies to simple .txt files, 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.

  1. Clone the repository:
    git clone https://github.com/your-username/proxar.git
    cd proxar
    
  2. Install the project and its dependencies:
    pip install -e .
    
    • To install development dependencies like mypy and ruff, use:
    pip install -e .[dev]
    

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 proxar directory inside your user data folder. You can override this by passing a storage_path argument 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

proxar-0.4.0.tar.gz (86.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proxar-0.4.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file proxar-0.4.0.tar.gz.

File metadata

  • Download URL: proxar-0.4.0.tar.gz
  • Upload date:
  • Size: 86.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for proxar-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d387b0c04f8a9a6bdf1780f9f6bfc1132c7c9ddf5b34b96c44b2352a7940e1e2
MD5 d72532b7a15ce95c8181d9604d20a0f9
BLAKE2b-256 398ea3afa38bc215eb827befb01bab9465cff4fbf4afe2897cde74401b19d769

See more details on using hashes here.

Provenance

The following attestation bundles were made for proxar-0.4.0.tar.gz:

Publisher: release.yml on filming/proxar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file proxar-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: proxar-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for proxar-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f90fcedce9b20f5c63ba707a889870b2ac4df49339733f8f3b638a44148b0ac
MD5 0d30b1e88cc3afade519a51282e9b953
BLAKE2b-256 509d93d9355e924caff9bb5ebb150701a196b69f9d481e08c107ed6305ef5d58

See more details on using hashes here.

Provenance

The following attestation bundles were made for proxar-0.4.0-py3-none-any.whl:

Publisher: release.yml on filming/proxar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page