Metadata-Version: 2.0
Name: prospyr
Version: 0.2.1
Summary: ProsperWorks client library
Home-page: https://github.com/salespreso/prospyr/
Author: Ben Graham
Author-email: ben.graham@salespreso.com
License: MIT
Keywords: ProsperWorks
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Requires-Dist: arrow
Requires-Dist: marshmallow
Requires-Dist: requests
Requires-Dist: six
Requires-Dist: urlobject
Provides-Extra: dev
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: flake8; extra == 'dev'
Requires-Dist: ipdb; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: mock; extra == 'dev'
Requires-Dist: nose; extra == 'dev'
Requires-Dist: rednose; extra == 'dev'
Requires-Dist: tox; extra == 'dev'
Requires-Dist: twine; extra == 'dev'

Prospyr
=======

A Python client library for ProsperWorks.

.. image:: https://api.travis-ci.org/salespreso/prospyr.svg?branch=master
   :target: https://travis-ci.org/salespreso/prospyr
   :alt: Prospyr builds

.. image:: https://img.shields.io/pypi/v/prospyr.svg
   :target: https://pypi.python.org/pypi/prospyr/
   :alt: Prospyr on Pypi.

Usage
=====

.. code-block:: python

    from prospyr import connect, resources

    # see https://www.prosperworks.com/developer_api/token_generation to obtain
    # a token.
    cn = connect(email='user@domain.tld', token='1aefcc3...')

    # collections can be ordered and sliced.
    newest_person = resources.Person.objects.order_by('-date_modified')[0]

    # new records can be created.
    art = resources.Person(
        name='Art Vandelay',
        emails=[{'email': 'art@vandelayindustries.net', 'category': 'work'}]
    )
    art.create()  # Art is local-only until .create() is called

    # related objects can be read and assigned
    art.company = resources.Company.objects.all()[0]
    art.update()

    # and deleting works too.
    art.delete()

Installation
============

.. code-block:: shell

    pip install prospyr


