Skip to main content

DriveX

Connect to Google Drive

  1. Installation:

    Install the DriveX library from PyPI or GitHub.

    pip install DriveX
    

    or

    git clone https://github.com/Sepehr0Day/DriveX.git
    
  2. Obtain Google Drive API Credentials:

    • Create a project in the Google Cloud Console.
    • Enable the Google Drive API for your project.
    • Create OAuth client ID credentials.
    • Download the credentials JSON file.
  3. Code:

    from DriveX import ServiceBuilder, GoogleDriveAPI
    
    # Path to the credentials JSON file
    credentials_path = 'credentials.json'
    
    # Path to save token
    token_path = 'Resources/Authenticator'
    
    # Name for the token file
    token_name = 'token'
    
    # Create ServiceBuilder object
    service_builder = ServiceBuilder(credentials_path=credentials_path, token_path=token_path, token_name=token_name)
    
    try:
        # Build service
        drive_service = service_builder.build_service()
        
        # Connect to Google Drive API
        drive_api = GoogleDriveAPI(service=drive_service, credentials=credentials_path)
        
        print("You Successfully Connected To Your Google Drive Account!")     
    
    except Exception as e:
        print(f"An error occurred: {e}")
    

    Make sure to replace 'credentials.json' with the path to your credentials JSON file obtained from the Google Cloud Console.

Documentation DriveX:

For more information and advanced usage, refer to the DriveX documentation.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Developer


Feel free to contribute to the project or report any issues on the GitHub repository!

Metadata

Release files for DriveX 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DriveX 0.1
File Size Uploaded
DriveX-0.1.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DriveX 0.1
File Interpreter ABI Platform
DriveX-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / DriveX-0.1.tar.gz

Download URL DriveX-0.1.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
206a6cac6934679558e42a8e91ee4c4435d6db9fa666a5ad215f430def188deb
BLAKE2b-256 checksum
How to use checksums
1a650e354971a5f96968c5a7a763fb4ed82a3ce0cb0cc35bb06d4303f8bd44b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / DriveX-0.1-py3-none-any.whl

Download URL DriveX-0.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef2b4b08e2ad53f5529d13213bcbe3362a8465efa689ee058d60d91dbc304f1a
BLAKE2b-256 checksum
How to use checksums
8728d10928c35fe8d33b21abf00bbda66d8b09510e1d8797ea7e3dc15100af27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page