Skip to main content

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

Project description

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!';
    }

}

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

RestForce-1.0.0.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file RestForce-1.0.0.tar.gz.

File metadata

  • Download URL: RestForce-1.0.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for RestForce-1.0.0.tar.gz
Algorithm Hash digest
SHA256 98d901206fa8016f8c7990c4e63e882fee7d57404e415993eff945f712394ddd
MD5 a066442b97d0c0805c36f8be04f6b15b
BLAKE2b-256 f98cecb016a83eefea695098209c3574e14d6ad82520f5e6356d63e4a8599c7f

See more details on using hashes here.

Supported by

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