Code Monkey home page Code Monkey logo

hs-file-uploader's Introduction

HubSpot File Uploader

This simple Python script is designed to uploading files to HubSpot using its API.

Prerequisites

  • Python 3.10 or higher

Setup

  1. Clone the repository or download the script directly.
  2. Install the required dependencies:
    pip install -r requirements.txt

Configuration

Before running the script, ensure you have a HubSpot API access token. If you don't have one yet:

  1. Visit the HubSpot API to get your API key.
  2. Set the obtained API key either by:
    • Modifying the HS_TOKEN variable in the script.
    • Exporting it as an environment variable: export HS_TOKEN=your_access_token.

Usage

Run the script using the command line with the following arguments:

python hs_file_uploader.py -s <source_path> -d <destination_folder>
Argument Description
-s, --source Path to the folder or file you want to upload.
-d, --destination Destination folder on the HubSpot file manager. Default path is "/".

Example

python hs_file_uploader.py -s /path/to/local/folder -d /remote/folder

Important Notes

  • This script excludes certain files and directories by default (e.g., .DS_Store, .git, .idea, node_modules), which will not be uploaded.
  • It supports asynchronous file uploading using multiple workers for efficiency. If a lot of 429 response status codes decrease count of workers

Feel free to modify the exclusion lists and adjust the worker count in the script as per your requirements.

For more information, refer to the HubSpot API Documentation.

Buy Me A Coffee

hs-file-uploader's People

Contributors

akkaky avatar

Stargazers

 avatar

Watchers

 avatar

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.