This script allows you to import albums into Discogs from a CSV file, ensuring that your collection is accurately transferred while avoiding duplicates.
- Imports albums into a specific Discogs collection folder.
- Uses Discogs release IDs for precise importing.
- Avoids duplicates by checking if the album already exists.
- Supports CSV input via command-line arguments.
- Retrieves the latest version of
discogs_clientfrom GitHub.
- Python 3.13+ is required.
- A Discogs API token (see configuration section).
pipandvenvinstalled.
git clone https://github.com/guroot/discogs-import.git
cd discogs-importpython3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txt👉 This will install the latest discogs_client from GitHub, as well as pandas for CSV handling.
-
Create a
config.inifile in the project directory:[Discogs] user_agent = DiscogsImporter/1.0 token = YOUR_DISCOGS_TOKEN_HERE username = YOUR_USER_NAME_HERE collection_folder = YOUR_FOLDER_HERE
-
Replace
YOUR_DISCOGS_TOKEN_HEREYOUR_USER_NAME_HEREYOUR_FOLDER_HEREwith your own information.- You can generate an API token on Discogs Developer Portal.
python3 import.py
👉 This will use discogs_export.csv by default.
python3 import.py my_collection.csv👉 Replace my_collection.csv with your own CSV export.
python3 import.py --help👉 Displays:
usage: import.py [csv_file]
Import albums into Discogs from a CSV file.
positional arguments:
csv_file Path to the CSV file (default: discogs_export.csv)
The script requires a CSV file with at least the following columns:
| Column Name | Description |
|---|---|
release_id |
Unique ID of the Discogs release |
Label |
Label of the album |
Title |
(Optional) Album title for reference |
Example CSV content:
release_id,Label,Title
123456,Blue Note,Kind of Blue
789012,Columbia,The Wall
Feel free to submit pull requests or open an issue if you find bugs or want to suggest improvements. 🎵
This project is open-source under the MIT License.
- Discogs API - Discogs Developer Portal
- Python Libraries -
discogs_client,pandas - Developed by: Jonathan Fleury ---(https://github.com/guroot)