Python SDK Convention
How to Use Python SDK
Our python SDK Interface mimicks the REST API paths.
REST paths are normalized into a resource chain, then exposed as client.<segment>.<segment>....
GET /core/v1/employees
client.core.employees.list()
GET /core/v1/employees/{id}
client.core.employees.retrieve(id="…")
GET /users/settings/preferences
client.users.settings.preferences.list() (or the appropriate method)
POST /core/v1/employees/{id}/approve
client.core.employees.approve(…)
Method names
Method names are derived from HTTP method and whether the path is collection or item (path ends with a parameter like {id}). Trailing action verbs become the method name.
HTTP
Collection (e.g. /employees)
Item (e.g. /employees/{id})
GET
list
retrieve
POST
create
—
PUT
update_many
update
PATCH
partial_update_many
partial_update
DELETE
delete_many
delete
Action verbs (only as the last path segment): approve, reject, undo, cancel → method name is the verb (e.g.client.core.employees.approve(id="…")).
Last updated