
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Driveup logo
Driveup is a python package to upload files and folders to Google Drive.
Contribution & Questions Type | Platforms |
---|---|
🐞 Bug Reports | [GitHub Issue Tracker] |
📦 Feature Requests & Ideas | [GitHub Discussions] |
🛠️ Usage Questions & Discusions | [GitHub Discussions] |
To start using DriveUp use the next command:
pip install driveup
Note: you might have to add this command as a “code” line in order to use Driveup on a Python notebook.
In this basic example, you can check how to use the package in order to upload an excel file to an specific folder in google drive.
from Driveup.drive import Drive
from Driveup.features.auth import authorize
EXCEL_PATH = 'C:\\Data\\Path\\sample_excel_file.xlsx'
SECRET_PATH = 'C:\\Data\\Path\\Secret\\service_account_key.json'
DRIVE_FOLDER_ID = '1wXpG03SN0RXI7y1QAd03IDGH2eXFD_VS'
creds = authorize(SECRET_PATH)
drive_obj = Drive(creds)
drive_obj.upload(EXCEL_PATH,DRIVE_FOLDER_ID)
In order to get access to Google Drive's API (required to use this package), you will need either a "service" or a "client" secret .json file (SECRET_PATH variable mentioned in the example of use).
You can follow the next steps to download this file:
Go to Google Cloud's console and create a new proyect:
Add Drive's and Sheet's API for the new created project:
Search for both Drive and Sheets and click 'enable' button on both.
Create a service/client account with access to this new created app and all its permissions:
Set default settings and choose a name for the account:
Edit the new created account, go to 'KEYS' tab and create one. Download the secret key .json file.
Note that if you are using a service account, you must share the drive folder in wich you will be uploading files with the service account mail direction for it to be able to find that folder. You can copy this direction from the 'service accounts' tab at the console dashboard:
Driveup is licensed under MIT License.
FAQs
Python package for uploading files and folders to Google Drive.
We found that driveup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.