smartsheet-python-sdk | uses Python to connect to Smartsheet services | REST library
kandi X-RAY | smartsheet-python-sdk Summary
kandi X-RAY | smartsheet-python-sdk Summary
This library is intended to simplify connecting to the Smartsheet API from Python applications.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Adds rows to a sheet
- Serialize an object
- Returns a list of all child properties of an object
- Prepare a request
- Set the status of a report
- Gets the status of a report
- Set publish status
- Returns the status of the worksheet
- Download an attachment
- Save the response to a file
- Adds new columns to a sheet
- List workspaces
- List all shares in a workspace
- List sent update requests
- List all sheets in a sheet
- List all folders in a workspace
- Update a share
- List workshift shares
- Returns a list of all workssheets in the organization
- Gets all discussions in a sheet
- Get a single row
- Updates the status of a view
- Adds fields to a sheet
- Get an access token
- Refresh an access token
- List worksheet works
smartsheet-python-sdk Key Features
smartsheet-python-sdk Examples and Code Snippets
Community Discussions
Trending Discussions on smartsheet-python-sdk
QUESTION
I was using an api -- smartsheet-python-sdk that was running fine when executed from the source code. However, when I went to package using PyInstaller I was getting an error because PyInstaller couldn't find the necessary modules. In the smartsheet library it is using importlib.import_module to import modules from the library.
...ANSWER
Answered 2020-Jul-30 at 08:35There's a few different reasons why this approach can be advantageous from a practical standpoint.
ConvenienceExplicitly listing modules requires additional steps that must be performed to integrate a new module. This step of declaring your import can be omitted entirely.
Less Prone To ErrorsIf new modules are added infrequently, forgetting to import the module in the correct location is one of those simple little mistakes that can occur. Removing that requirement means that mistake cannot happen. Will this approach have other downsides instead? Sure, but the weight of those tradeoffs is subjective.
ExtensibilityIn a comment you wrote
I just don't see the reason this particular case would need that since it will only ever be referring to its own modules.
This is a faulty assumption. It is entirely possible a module may come from another location at some future point. Unlikely? Maybe, but this design allows for more easily adding a new possible location - here two locations are used, a third is certainly possible. Maybe mocks are used for testing purposes, for example. Certainly there are other approaches that can work, but this seems to be a possible reason for this approach.
But What About PyInstaller?Ultimately, you are correct that this approach makes it difficult to easily load into PyInstaller. From their documentation, there are some workarounds that you can apply to the scripts of your build process. (Copied here for convenience)
Some Python scripts import modules in ways that PyInstaller cannot detect: for example, by using the
__import__()
function with variable data, usingimp.find_module()
, or manipulating thesys.path
value at run time. If your script requires files that PyInstaller does not know about, you must help it:
- You can give additional files on the
pyinstaller
command line.- You can give additional import paths on the command line.
- You can edit the
myscript.spec
file that PyInstaller writes the first time you run it for your script. In the spec file you can tell PyInstaller about code modules that are unique to your script.- You can write “hook” files that inform PyInstaller of hidden imports. If you create a “hook” for a package that other users might also use, you can contribute your hook file to PyInstaller.
QUESTION
Smartsheet API beginner using python is in need of help
Hi, everyone. I am working on smartsheet API and am trying to follow the website to get some exercise first from https://smartsheet-platform.github.io/api-docs/#sdks-and-sample-code.
I have python 2.7.15 on Mac, so the first step I did was to download the pip folder, and type "pip install smartsheet-python-sdk" on my terminal to install pip. Then I used my .py file to test out the code, I ran the first line import smartsheet
and there is an error already.
The message I got is below, any suggestions will be appreciated:
...ANSWER
Answered 2019-Apr-27 at 18:10enum
module was added in Python 3.4 but you're on Python 2.7. The smartsheet platform claims to support Python 2.7 but it also requires the import of enum
for it to work.
You can submit an issue to the project and hope that they fix it or upgrade to Python 3.4 and beyond.
QUESTION
So I am trying to package a program I wrote for my job that allows people to add, update, delete the same row/columns over multiple spreadhseets (@ Smartsheets) at the same time. I am using Kivy, and the Smartsheet-Python-SDK
When I go to package the app with PyInstaller, per Kivy's direction, I get errors: "module 'enum34' has no attribute 'IntFlag' " and "'str' object has no attribute 'items' "
Now when I search this error, the only suggestions I see are to uninstall enum34 and install the regular enum module.
Even bigger problem is that the Smartsheet API requires enum34, and the PyInstaller requires regular enum.
Any suggestions on how to tackle this? Can I have my cake and eat it too, in having both installed some how? It seems that enum34 installs in the same folder as enum (I could be wrong but I thought I read this more than once).
I have looked at the suggestions all over this site, but I need to somehow have both per each things requirements.
I've tried just uninstalling enum34 and installing regular enum, but as you can guess it breaks my smartsheet module.
Here is the error, not sure my code is necessary (plus I worked hard, don't want it stolen).
...ANSWER
Answered 2019-Jan-31 at 17:47enum34
is a back-ported library for the enum
type introduced in python3.4, see PEP435 and maybe this SO post. But since you are running python3.7, this dependency cannot be correct.
Apparently, the smartsheet
developers already know about this issue and provided a fix. See this issue description and the fixing commit. Upgrading smartsheet
likely will fix your problem.
QUESTION
I need to get the last modified timestamp property of a sheet using Smartsheet API 2.0 (preferably Python SDK). Ref:
Using Sheets.list_sheets
I am able to get the 'modifiedAt' property (along with other properties) for all the sheets that I have access to.
Using Sheets.get_sheet(sheet_id
) I get all the data (rows, columns) for the specified sheet.
How do I get only the 'modifiedAt' (it's OK if some other small properties are also present) for a specific sheet with a known sheet ID. I don't want the row, column, cell information to be present in the API response.
...ANSWER
Answered 2018-Jul-24 at 18:26The Get Sheet call will always return the content (row, column, data) from a specific sheet. While there is an 'exclude' query parameter that can filter out some properties, it does not work on the primary sheet data returned from the /sheets/{sheetId}
endpoint.
The Sheets.list_sheets
call seems like the easier route if you only need the modifiedAt property. I would use that one then iterate over the results until you find the matching id.
QUESTION
I'm getting the following error when installing the smartsheet-python-sdk package on my Mac. Can anyone give me any pointers?
...ANSWER
Answered 2017-May-25 at 02:44I found this post that refers to a known issue with python package dependencies on OS X 10.11 and to work around it using the '--ignore-installed' flag on the pip command and it worked!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install smartsheet-python-sdk
If unfamiliar with pip, please review the pip documentation.
To install this SDK manually, download the source code from GitHub and then run:.
Getting started with the Python SDK is easy:. See a sample application here: https://github.com/smartsheet-samples/python-read-write-sheet.
Set SMARTSHEET_ACCESS_TOKEN in your environment. Find out more about Authentication and Access Tokens in the Smartsheet API Documentation.
Install the Smartsheet Python SDK from the Python Package Index, or by using "pip install smartsheet-python-sdk".
Import the smartsheet module: import smartsheet
Refer to the Smartsheet API Documentation for Python SDK usage examples.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page