This script allows you to upload JSON files to your Shopify store's files section from the command line with the Admin API.
This tool was independently developed and maintained. It is not in any way affiliated with, endorsed by, or supported by Shopify Inc.
The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.9+
- pip (Python package manager)
Step 1: Clone the repository to your local machine:
git clone https://github.com/JimmyMcKegger/json-uploader.gitStep 2: Navigate into the project directory:
cd json-uploaderStep 3: Create a virtual environment:
python3 -m venv venvStep 4: Activate the virtual environment:
On Windows:
.\venv\Scripts\activateOn MacOS/Linux:
source venv/bin/activateStep 5: Install the requirements:
pip install -r requirements.txtStep 6: Create a .env file in the project root directory. Use the following template and replace the placeholders with your actual Shopify store details:
SHOP=example.myshopify.com
API_ACCESS_TOKEN=123123123123123123123123
API_VERSION=2023-07
API_SECRET_KEY=shpss_12312312312123123123123Step 7: Either run the script with python or make it executable:
python3 upload path/to/file.jsonOR
On MacOS/Linux:
chmod +x uploadThat's it! You're now ready to use the script.
To run the script, pass the name of the JSON file you want to upload as a command-line argument:
./upload path/to/file.jsonThis will process the file.json file and upload it to your Shopify store.
Pull requests to add support for more file types are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE.md file for details.