Skip to main content

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

}

Metadata

Release files for RestForce 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RestForce 1.0.0
File Size Uploaded Provenance Actions
RestForce-1.0.0.tar.gz 5.4 kB Without provenance Details for RestForce-1.0.0.tar.gz

Release files / RestForce-1.0.0.tar.gz

Download URL RestForce-1.0.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
98d901206fa8016f8c7990c4e63e882fee7d57404e415993eff945f712394ddd
BLAKE2b-256 checksum
How to use checksums
f98cecb016a83eefea695098209c3574e14d6ad82520f5e6356d63e4a8599c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for RestForce 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page