skip to navigation
skip to content

Not Logged In

RestForce 1.0.0

A python API for accessing RESTful resources on the force.com platform.

Usage

Rest Force offers a python API for easily working with RESTful resources exposed by the force.com platform. Typical usage often looks like this:

#!/usr/bin/python

from restforce.login import SalesforceAuthenticationFailedException
from restforce.rest import Resources, RestInvocationException

try:
    r = Resources()
    print r.post('hello', '{ "postData" : "world"}')
    print r.get('hello/1')
    print r.delete('hello/1')
except SalesforceAuthenticationFailedException as e:
    print e
except RestInvocationException as e:
    print e

Salesforce REST Example

Creating a REST resource on the force.com platform is easy. Here's an example::

@RestResource(urlMapping='/hello/*')
global class HelloResource {

    @HttpGet
    global static String doGet()
    {
        return 'Hello, world!';
    }

    @HttpDelete
    global static String doDelete()
    {
        return 'Good bye, cruel world!';
    }

}
 
File Type Py Version Uploaded on Size
RestForce-1.0.0.tar.gz (md5) Source 2012-04-10 5KB
  • Downloads (All Versions):
  • 7 downloads in the last day
  • 24 downloads in the last week
  • 160 downloads in the last month