weebly

Python functions to interface with Weebly Cloud Api


License
MIT
Install
pip install weebly==0.2

Documentation

weebly

Python functions to simplify interfacing with weebly cloud api

The client must be instantiated as an object which is initialized with the API_KEY and API_SECRET from your Weebly Cloud Dashboard.

Example:

    wclient = WeeblyClient(api_key='your-api-key-here', api_secret='your-api-secret-here')

To run the unittests, you must create a user account set the global variable such as:

    WEEBLY_TEST_ACCOUNT_ID = 'your-user-id-here'

The following methods are provided:

    *     hash = wclient_hash(content)
    * response = wclient.get(url)
    * response = wclient.post(url, data)
    * response = wclient.put(url, data)
    * response = wclient.patch(url, data)
    * response = wclient.delete(url)
    * response = wclient.loginlink(user_id)

The URL should NOT include the base url https://api.weeblycloud.com.

Check Weebly documentation for specifics on format of data.

Example usage:

    # create new user account
    from weebly.utils import *
    wclient = WeeblyClient(api_key='your-api-key-here', api_secret='your-api-secret-here')
    my_url = 'user/'
    my_data = {'email': 'tester@fake.com'}
    resp = wclient.post(my_url, my_data)

Unittests

To run the unittests you must edit the test.py file and include your api_key, api_secret, and test_account_id. Afterwards run nosetests.