Skip to main content

Python client for the Yola API

Project description

https://travis-ci.org/yola/yolapy.svg?branch=master

Usage

# settings file

from yolapy.configuration import configure

configure(
    auth=('username', 'password'),
    url='https://wl.qa.yola.net/',
)

# application code

from yolapy.models import User as YolaUser

yola_user = YolaUser(
    email='test@example.com',
    name='Jane',
    surname='Doe',
    partner_id='WL_YOLA',
    preferences={'name': 'value'})
yola_user.save()

See http://yolapy.readthedocs.org/ for available methods with documentation.

Development

To run the tests:

$ nosetests

Integration tests are not run by default. To run them, you must set up an integration environment and edit the test settings:

$ cp tests/test_integration/test_settings.py.sample \
     tests/test_integration/test_settings.py

Note: Try not to run the tests against the Yola QA environment. It gets used for manual testing and we don’t want to clutter it up with users created in automated test runs.

Then you can run the integration tests explicitly:

$ nosetests tests/test_integration

To test and lint your code automatically when you make changes:

$ cp tube.py.sample tube.py
$ stir

To open a REPL with a Yola client initialized with your test_settings:

$ python -i shell.py

Documentation

Changes to the public interface should be documented. See the docs directory.

Pushes to the master branch build at http://yolapy.readthedocs.org/en/latest/ automatically.

You can test your doc changes locally with:

$ cd docs
$ make html
$ open _build/html/index.html

0.4.0

  • Update Subscription model to expect the actual data from service response.

0.3.0

  • Drop support for python 3.2

  • Yola.get_sso_open_site_url now accepts an optional site_id specifying the site to generate a url for

  • Use Demands >= 4.0.0

0.2.4 (2016-06-17)

  • Fix mismatch between demands version in setup.py and requirements.txt

0.2.3 (2016-06-17)

  • Handle pagination in Site.list

  • Add User.get class method that returns a populated User object

0.2.2 (2016-04-06)

  • Add Site.is_published

0.2.1 (2016-03-31)

  • Add Site.list

0.2.0 (2016-03-29)

  • Yola.create_subscription now returns the created subscription.

  • Breaking change: Remove Yola.suspend_user and Yola.resume_user.

  • Add a Site model.

0.1.7 (2015-12-02)

  • Update Subscription model to include all attributes returned from the API.

0.1.6 (2015-12-01)

  • Update installation requirements (demands)

  • Support Python 3

0.1.5 (2015-11-23)

  • Return values from change_subscription_type and activate_trial_subscription methods.

  • Fixed failing integration tests.

0.1.4 (2015-11-19)

  • Add Subscription model

0.1.3 (2015-10-19)

  • Add a Partner model

0.1.2 (2015-10-15)

0.1.1 (2015-09-11)

  • Update installation requirements

0.1.0 (2015-09-02)

  • Initial version with Yola wrapper for the Yola API

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

yolapy-0.4.0.tar.gz (13.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: yolapy-0.4.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yolapy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 76b1269dc6307e7d33ae53e08046dffb5bd23bdb7a58ff543d9133ec2575615a
MD5 76a988b2b8f5538a89d598ecd6eddf6a
BLAKE2b-256 db41667e61c917c21aa3e8e8e3fe9b055b2bd0a2edea908ce10217f98605d817

See more details on using hashes here.

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