Smartsheet Python SDK
A library for connecting to the Smartsheet API from Python applications.
Requirements
The SDK is compatible with actively supported Python versions 3.10
, 3.9
, 3.8
, 3.7
.
Installation
To install using pip:
pip install smartsheet-python-sdk
Getting Started
To get started with the Smartsheet Python SDK:
-
Set SMARTSHEET_ACCESS_TOKEN in your environment, using your Smartsheet API key. Find out more about Authentication and Access Tokens in the Smartsheet API Documentation. You can generate an access token in Smartsheet UI under Account > Personal Settings > API Access.
-
Install the Smartsheet Python SDK (see the installation instructions above)
-
The following snippet shows how to create a Smartsheet client and perform some basic actions using the SDK. Ensure your Smartsheet user has access to at least one sheet.
import smartsheet
smart = smartsheet.Smartsheet()
response = smart.Sheets.list_sheets()
sheetId = response.data[0].id
sheet = smart.Sheets.get_sheet(sheetId)
print(f"The sheet {sheet.name} has {sheet.total_row_count} rows")
Documentation
Use the following resources to learn more about the SDK capabilities:
- Smartsheet Python SDK sample project
- Python SDK documentation
- Smartsheet API Documentation
Advanced Topics
For details about logging, testing, how to use a passthrough option, and how to override HTTP client behavior,
see Advanced Topics.
Developer Agreement
Review the Developer Program Agreement.
Acknowledgements
We would like to thank the following people for their contributions to this project: