Skip to main content

A Python client library for the Webshare Proxy API, providing easy access to various operations like managing proxies, IP authorizations, user profile, notifications, and more.

Project description

Webshare Proxy API Python Client

GitHub last commit PyPI - Downloads

A Python client library for the Webshare Proxy API, providing easy access to various operations like managing proxies, IP authorizations, user profile, notifications, and more.

Installation

Recommended installation method is via pip:

pip install webshareproxy

Alternatively, you can clone the repository and install it manually:

git clone https://github.com/heromr/webshareproxy.git
cd webshareproxy
python setup.py install

Getting Started

To get started with the Webshare Proxy API Python client, you'll need an API key from Webshare Proxy. If you don't have one, you can obtain it by signing up on the Webshare Proxy website.

Once you have the API key, you can create an instance of the ApiClient class and pass the API key as an argument:

from webshareproxy import ApiClient

# Replace 'YOUR_API_KEY' with your actual API key from Webshare Proxy
api_key = "YOUR_API_KEY"

# Create an instance of the ApiClient class
api_client = ApiClient(api_key)
  

Available Methods

The ApiClient class provides several methods to interact with the Webshare Proxy API. Each method corresponds to an API endpoint and performs specific operations. Here are some of the available methods:

create_ip

Create a new IP authorization entry.

ip_address = "123.45.67.89"
new_ip_auth = api_client.create_ip(ip_address)
print("New IP Authorization ID:", new_ip_auth.id)
  

get_ip

Get a list of IP authorization entries.

ip_authorizations = api_client.get_ip()
for ip_auth in ip_authorizations.get_results:
    print("IP Address:", ip_auth.ip_address)
  

get_proxy_list

Get a list of proxies with optional filters.

# Get a list of proxies country code 'US'
proxies = api_client.get_proxy_list(country_code_in='US')
for proxy in proxies.get_results:
    print("Proxy Host:", proxy.proxy_address)
    print("Proxy Port:", proxy.port)
    print("Proxy Username:", proxy.username)
    print("Proxy Password:", proxy.password)
    print("Country Code:", proxy.country_code)
    print()
  

Contributing

Contributions are welcome! If you find a bug, have any questions, or want to suggest an improvement, feel free to open an issue or submit a pull request.

License

This library is open-source and available under the MIT License. See the LICENSE file for more details.

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

webshareproxy-0.0.10.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

webshareproxy-0.0.10-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

Supported by

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