Skip to main content

SalesKing API Wrapper and SDK

Project description

# SalesKing Python SDK (beta)

Your Business Cockpit one REST call away.
Online CRM / Invoicing integration / PDF Template

You never need to build your Customer Invoicing
yourself again.

The SDK wraps the REST json schema API.

## How the SDK works

# Examples

## Create a Client

>>> from salesking import resources
>>> model = resources.get_model_class("client")
>>> data = {"organisation": "first customer"}
>>> client = model(data)
>>> client = client.save()

## Create Client with nested Address

>>> from salesking import resources
>>> model = resources.get_model_class("client")
>>> client = model()
>>> client.organisation = "second customer"
>>> model = resources.get_model_class("address")
>>> address = model()
>>> address.city = u"Duisburg"
>>> address.address1 = u"Foo Street"
>>> address.address2 = u"Appartment Bar"
>>> address.address_type = u"work"
>>> client.addresses = [address]
>>> client = client.save()
>>> print client.get_data()

## List all Clientss with salesking in the name

>>> from salesking import collection
>>> valid_filters = {u"q": u"salesking"}
>>> col = collection.get_collection_instance("client")
>>> col.set_filters(valid_filters)
>>> col.load()
>>> for x in col.items:
>>> print "numbers %s" % x.number


## What you need to do in order to start

1) Register and activate a DEVELOPMENT USER at

* https://dev.salesking.eu/signup

2) Register Your app inside your salesking dev account


3) Take a look at the api

* http://www.salesking.eu/dev/
* http://www.salesking.eu/dev/docs/
* http://www.salesking.eu/dev/api/

4) Browse the schema

* http://sk-api-browser.heroku.com

5) create a local_settings.py in site-packages/salesking/.conf

6) edit your details in local_settings.py

7) have fun

# TODO:

* Examples
* Add Invoice
* Send Invoice

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

salesking-0.0.1.tar.gz (15.5 kB view details)

Uploaded Source

File details

Details for the file salesking-0.0.1.tar.gz.

File metadata

  • Download URL: salesking-0.0.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for salesking-0.0.1.tar.gz
Algorithm Hash digest
SHA256 53bdeed38778e54276d225e84af051a50af8321e740fa1742b0f8ac19991ff3f
MD5 9b4bef75b8e5dace60845751ed6f2b07
BLAKE2b-256 895204b5866b4aca2a8a60328c592887eb15ddeab00972ce8b9b4734b5955e91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page