Releases: forcedotcom/SalesforcePy
Releases · forcedotcom/SalesforcePy
2.2.0
This release introduces support for OAuth2 Device Flow.
Example implementation
import SalesforcePy as sfdc
import json
def on_authorize(res, authz):
# Add any required logic to perform on authorization response here
pass
def on_authenticate(res, authn):
# Raise an exception if the response was any error other than pending authorization, otherwise return.
if authn.status != 200 and authn.exceptions[0].get("error") != "authorization_pending":
raise Exception(json.dumps(res))
else:
return
client = sfdc.client(None, None, "<client id here>")
# Note that `on_authorize` and `on_authenticate` handlers are optional but highly recommended, especially
# to ensure authn polling fails out appropriately.
with client.login_via_device_flow(on_authorize=on_authorize, on_authenticate=on_authenticate) as c:
account = c.query('SELECT Id FROM Account LIMIT 1')
2.0.0
- PyPi installation fixes
- Improved exception handling for login requests
1.1.1
- Documentation revamp
- Freezing flake8 version
1.1.0
Supported Bulk API 2.0 calls can be made from SalesforcePy.Client.jobs.ingest.
1.0.3
Setup changes
1.0.2
- Documentation support added
1.0.1
PyPI Readiness (1.0.1)
1.0.0
Maiden voyage (1.0.0)