Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curseforge_mod_downloader-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

curseforge_mod_downloader-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file curseforge_mod_downloader-1.0.0.tar.gz.

File metadata

File hashes

Hashes for curseforge_mod_downloader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a9b3f2160b9683076913021bd9faca324dc14017ee50403e61b06d7e180ca719
MD5 2a388cc94d3a019ec8bd109fbce3f146
BLAKE2b-256 3b5b7a0d576fac5f09b12719b7fdc36b909cd1a5c255892117f9b92bbd90cb39

See more details on using hashes here.

File details

Details for the file curseforge_mod_downloader-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for curseforge_mod_downloader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 772ea0de26f44730ec2aeb7a7f6050db71db7b0f3ec714676a2ed0ff8c6f52db
MD5 6b4aeb6b7a0ba37b68be3dc7d6e9976a
BLAKE2b-256 af70f8c043dcb1133aab458d604c4cee78fc023fb05586dfa9a3dd5a2d6c94f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page