This tool fetches part data from a PartDB instance and generate CSV files of all your parts (ID,Name,Scan URL) for label printing.
It is designed to work with Label Software like P-Touch, allowing you to easily create labels for your parts inventory.
Multiple entries for each lot are generated so that you don't have to manually create labels for each lot amount.
- Clone this repository to your local machine.
- Install the required Python packages:
pip install -r requirements.txt
- Create a
.env
file in the project root and set theBASE_URL
andAPI_TOKEN
for your PartDB instance:ReplaceBASE_URL=https://your-partdb-instance.com API_TOKEN=your_api_token_here
https://your-partdb-instance.com
with the base URL of your PartDB instance andyour_api_token_here
with your API token. You can get an API token from your PartDB user settings. /en/user/settings
- Run the script to fetch part data and generate the CSV file:
python fetch.py
- The generated CSV file (
parts_list.csv
) will be saved in the project directory. - Load this CSV file into your label printing software for P-Touch: File -> Database -> Open Database -> Connect Database File -> Select your parts_list.csv file
- Match ID to ID and Name to Name if it doesn't match automatically.