-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestions for Wrapper and Convenient Methods (add protect/unprotect all) #1208
Comments
Hi thank you for this generous proposal, we'll have a close look at it when we have time. It does look interesting. As long as you needed to do these wrappers that means we are lacking some features. We'll be back here with more details and we'll happy if you can provide a PR to introduce some of it. |
Thanks - I was reluctant to submit a PR because I didn't know whether to overwrite/modify an existing class or just add it as an optional wrapper/utility. If you can direct me a little bit as to how/where to try grafting it on, I'll be happy to give it a try, but actually suspect you'll be able to do so quicker, knowing the codebase as you do :) |
Hi, great issue! Thanks for taking the time to make these suggestions. I have some replies, some may be opinionated. I will give a small overview of each attribute/method you suggest. For reference, I use
|
Many thanks for the constructive and friendly reply! Yep I'll definitely have a go now you've pointed me in the right direction - probably next week now :) Please feel free to assign this Issue to me! I saw you've got a All the best! |
Super! Let us know if you need help with anything! |
@PFython We would still love your help on this, if you are interested. If you no longer wish to, then I will make a PR adding protect/unprotect shortcuts in the coming weeks. |
Thanks for your patience and gentle prod @alifeee! I'm almost finished but got stuck because Thanks in advance for any insight! |
Ah, I see the issue. Did you get If you are happy to, I'd suggest you submit a draft PR so we don't lose out on any code you wrote. Then, we can take a look at it with our knowledge of the codebase and see if we can think of a good solution. auth is more in @lavigne958's area of knowledge. |
Thanks guys - I just submitted a draft PR: #1273 All the best, |
PR exists, but we are unsure how to get the email needed for the protected range. See #1273 (review) |
Is your feature request related to a problem? Please describe.
First of all, thanks for all the effort you've put into this package already - it's really helped me on my latest project.
I created the following general purpose 'wrapper' for quickly creating a Worksheet/Tab based on key, title, sheet name, sheet index, or account path. It also includes convenience methods for:
.view()
: Opening a worksheet in your browser directly.protect()
: Protecting a whole sheet (except for the service account running the code).unprotect()
: Unprotecting a whole sheet.df
: Converting directly to a Pandas DataFramepandas.DataFrame.to_gspread()
: Saving a Pandas DataFrame (created using.df
) back to its associated worksheetI've also added convenience attributes to the worksheet object:
.email
: the service account email (needs to be 'invited' to share a Google Sheet before having access).account_path
: path to the service account JSON fileIt wasn't immediately obvious to me where to add these in your structure otherwise I'd have created a pull request but the basic code is below if you think this would be a helpful utility to include?
Describe the solution you'd like
If you like (some or all of) this and want to incorporate it, I'd be happy submit relevant updates to the README doc.
The text was updated successfully, but these errors were encountered: