GithubHelp home page GithubHelp logo

raul-martin-dev / driveup Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 749 KB

Python package for uploading files and folders to Google Drive

License: MIT License

Python 96.69% Rich Text Format 0.02% HTML 3.29%
api automation cloud cloudautomation google google-cloud googlecloudplatform googledatastudio googledrive looker-studio

driveup's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

driveup's Issues

Method for uploading multiple files simultaneously

DriveUp version checks

  • I have checked this method doesn't exists on the latest version of Driveup.
  • I have checked that this issue has not already been reported.

Reproducible testing example

from Driveup.drive import Drive
from Driveup.features.auth import authorize

# Global variables
TESTS_DIR = os.path.dirname(os.path.abspath(__file__)) 
SERVICE_SECRET_PATH = os.path.join(tests_dir,"__testsDataFiles","auth_testFiles","service_account_key.json")

UPLOAD_FILE_PATH_1 = os.path.join(tests_dir,"__testsDataFiles","drive_testFiles","test_file.csv")
UPLOAD_FILE_PATH_2 = os.path.join(tests_dir,"__testsDataFiles","drive_testFiles","test_file_test.csv")

DRIVE_FOLDER_ID_1 = 'https://drive.google.com/drive/folders/1wXpG03SN0RXI7y1QAd03IDGH2eXFD_VS'
DRIVE_FOLDER_ID_2 = 'https://drive.google.com/drive/folders/1w32Xx3SNCOF47y1QAs13IDFR8eXFD_VS'

# Method for uploading multiple files simultaneously
def test_multiple_upload(self):
      authorization = authorize(CLIENT_SECRET_PATH)
      drive = Drive(creds)
 
      files_paths = [UPLOAD_FILE_PATH_1, UPLOAD_FILE_PATH_2]
      folder_paths = [DRIVE_FOLDER_ID_1, DRIVE_FOLDER_ID_2]

      drive.upload(files_path, folder_paths)

Issue description

After testing the basic method of uploading a file to a specific directory on Google Drive, I have noticed that I can only upload files that are within a folder/directory. This forces me to upload the entire folder with all the files, and then move them out of the automatically created folder on Drive.

As an improvement and potential use for process automation, it would be beneficial to be able to upload multiple files simultaneously without having to place them within a folder. This would allow for better maneuverability with documents. As a proposed improvement to this method, it would be great to have the option to define different paths or IDs for each file.

An example of implementation or use case could be uploading three different files, such as a Google Doc, a Google Sheet, and a Google Presentation, and sending each to a different directory for storage based on file type.

"pydrive" package is outdated!

Driveup current version (v0.2.4) is using the outdated package "pydrive" to make all the flow of authorization, creating and updating files. An update is planned solving this. Current version is functional but have problems in certains tested automations: The current update method updates drive files by overwriting the whole file bringing new changes. This works just fine in almost every ocasion but have problems when linking a google spreadsheets to a LookerStudio inform. There is an instant where Looker doesn't have any data resources and is necessary a manual re-connection of the sheets used (wich is a big problem for automation).

Please apologize for this inconvenience! working hard on this.

Please issue any other possible problems using Driveup or if you find any other automation or circumstance where this problem is replicated.

Thanks for reading.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.