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
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
Release history Release notifications | RSS feed
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
Hashes for webshareproxy-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c612bfb9f63e74224c1f17dcae48c9fbefa9dd7c6a129c566b25599662086a1 |
|
MD5 | 6a84e1d80383a7e488e930d5c292a223 |
|
BLAKE2b-256 | a173b0d59d80ce02ff7714e2d1649e7ad3ba74da18094e0797ec944aaac862ac |