Simple Python library to download Minecraft mods from CurseForge
Project description
curseforge-mod-downloader
Simple Python library to download Minecraft mods from CurseForge.
Installation
pip install curseforge-mod-downloader
Usage
As a library
import cfm_downloader as cfm
# Basic download
result = cfm.download("jei", "1.20.1")
print(result.path) # /path/to/jei-1.20.1-forge-15.20.0.112.jar
print(result.mod_name) # Just Enough Items (JEI)
print(result.size) # 1385600
# Download with URL
result = cfm.download("https://www.curseforge.com/minecraft/mc-mods/create", "1.20.1")
# Filter by release type
result = cfm.download("jei", "1.20.1", release_type="beta")
# Custom output directory
result = cfm.download("jei", "1.20.1", output_dir="./mods")
# Progress callback
def on_progress(downloaded, total):
print(f"{downloaded}/{total} ({downloaded*100/total:.1f}%)")
result = cfm.download("jei", "1.20.1", progress_callback=on_progress)
# Get available versions
versions = cfm.search_versions("jei")
print(versions) # ['1.12.2', '1.16.5', '1.18.2', '1.19.2', '1.20.1', ...]
# Get mod info
info = cfm.mod_info("jei")
print(info["title"]) # Just Enough Items (JEI)
print(info["summary"]) # ...
As a CLI tool
cfm-download jei 1.20.1
cfm-download https://www.curseforge.com/minecraft/mc-mods/create 1.20.1 --output ./mods
cfm-download jei 1.20.1 --type beta
API Reference
cfm.download(mod, version, release_type=None, output_dir=None, progress_callback=None)
Download a mod from CurseForge.
- mod — CurseForge URL, mod slug, or project ID
- version — Minecraft version (e.g.
"1.20.1") - release_type — Optional:
"release","beta", or"alpha" - output_dir — Directory to save the file (default: current directory)
- progress_callback — Optional
callable(downloaded_bytes, total_bytes)
Returns DownloadResult with attributes: path, file_name, file_id, mod_name, mc_version, release_type, size.
cfm.search_versions(mod)
Returns a list of available Minecraft versions for the mod.
cfm.mod_info(mod)
Returns a dict with mod metadata (title, id, summary, versions, etc).
cfm.CurseForgeError
Exception raised on any download/API error.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curseforge_mod_downloader-1.0.0.tar.gz.
File metadata
- Download URL: curseforge_mod_downloader-1.0.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9b3f2160b9683076913021bd9faca324dc14017ee50403e61b06d7e180ca719
|
|
| MD5 |
2a388cc94d3a019ec8bd109fbce3f146
|
|
| BLAKE2b-256 |
3b5b7a0d576fac5f09b12719b7fdc36b909cd1a5c255892117f9b92bbd90cb39
|
File details
Details for the file curseforge_mod_downloader-1.0.0-py3-none-any.whl.
File metadata
- Download URL: curseforge_mod_downloader-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
772ea0de26f44730ec2aeb7a7f6050db71db7b0f3ec714676a2ed0ff8c6f52db
|
|
| MD5 |
6b4aeb6b7a0ba37b68be3dc7d6e9976a
|
|
| BLAKE2b-256 |
af70f8c043dcb1133aab458d604c4cee78fc023fb05586dfa9a3dd5a2d6c94f9
|