Python Wrapper for Webshare API
An API_KEY
can be obtained from your Webshare Account through the Webshare API Portal
There are two ways to provide authentication credentials to the module.
- Directly invoking the
Webshare
object constructor with your WebshareAPI_KEY
client = webshare.Webshare(api_key=API_KEY)
- By default, the object constructs itself through the
env.ini
Configuration File. An example of this file is provided in the project directory.
- If the
env.ini
configuration file is stored within the current working directory, or the parent file directory, the object will automatically invoke itself.
client = webshare.Webshare()
- Else, the absolute path to the
env.ini
file can be supplied to the constructor:
client = webshare.Webshare(config_path=ABSOLUTE_PATH_TO_CONFIG)
from pywebshare import webshare
client = webshare.Webshare()
profile = client.get_proxy_list()
from pywebshare import webshare
subuser_client = webshare.Webshare(portal="subuser", user_id=SUBUSER_ID)