Skip to content

GCP Storage Manager A CLI tool for managing Google Cloud Storage (GCS). Upload, view, and delete files in your GCS bucket. Easy setup with virtual environment and .env configuration. See README for details.

License

Notifications You must be signed in to change notification settings

JayJCodez/GCP-Uploader-v1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌐 GCP Storage Manager

This project provides a command-line interface (CLI) for managing files in Google Cloud Storage (GCS). 🚀 You can upload files, view blobs in a bucket, and delete specific blobs using this tool.

📑 Table of Contents

  1. Features
  2. Installation
  3. Usage
  4. Configuration
  5. Contributing
  6. License

✨ Features

  • 📤 Upload Files: Upload files to a specified GCS bucket and make them publicly accessible.
  • 👁️ View Blobs: List all blobs in a specified GCS bucket with details such as size, content type, and public URL.
  • 🗑️ Delete Blobs: Delete specific blobs from a GCS bucket by selecting them from a list.

🚀 Installation

  1. Clone the Repository:

    git clone https://github.com/JayJCodez/GCP-Uploader-v1.git
    cd gcp-storage-manager
  2. Create and Activate a Virtual Environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Create a .env File: Create a .env file in the root of your project directory with the following content:

    SERVICE_ACCOUNT_KEY_PATH=path/to/your/service_account_key.json
    BUCKET_NAME=your-bucket-name

🛠️ Usage

  1. 📤 Upload a File:

    python main.py

    Follow the prompts to specify the file path and destination blob name.

  2. 👁️ View Blobs:

    python main.py

    Choose the option to view blobs to list all blobs in the bucket.

  3. 🗑️ Delete Blobs:

    python main.py

    Choose the option to delete files, then select the blobs to delete by entering their numbers.

🔧 Configuration

Ensure that your .env file contains the correct paths and bucket name:

  • SERVICE_ACCOUNT_KEY_PATH: The path to your GCP service account key file.
  • BUCKET_NAME: The name of your GCS bucket.

🤝 Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

📜 License

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


Feel free to replace placeholders like https://github.com/yourusername/gcp-storage-manager.git with your actual repository URL, and adjust instructions as needed for your specific project setup. 🎉

About

GCP Storage Manager A CLI tool for managing Google Cloud Storage (GCS). Upload, view, and delete files in your GCS bucket. Easy setup with virtual environment and .env configuration. See README for details.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages