Skip to main content

A no-compromises wrapper for the CurseForge API

Project description

Curseforge API

This is a no-compromise CurseForge API wrapper for python. It is a re-write of cursepy which is maintained but not actively developed. This project is a complete re-write of the original project, with a focus on simplicity and ease of use.

This project is still in development, and is not yet ready for production use. It also speeds up the process by using disk caching, It will cache the response from the API and will only make a new request if the request is not cached.

This, of course can be disabled by setting the cache to False.

Features

  • Simple and easy to use
  • Caches responses from the API to disk for faster response times
  • Allows direct access to the API via the fetch method
  • Allows exporting of the objects to DICT, JSON, or YAML

Installation

pip install curseforge

Usage

from curseforge import CurseClient

client = CurseClient("API-KEY", cache=True)

minecraft = client.game(432) # 432 is the ID of Minecraft

# or we can list all the games
games = client.games()

for game in games:
    print(game.name)

# The search is up to the user to implement, this is just a wrapper

# We can also get the latest files for a project

JourneyMap = client.mod(2238) # 2238 is the ID of JourneyMap

for file in JourneyMap.files:
    print(file.name)

TODO

  • Implement the export methods
  • Implement the cache
  • Implement the fetch method
  • Deal with the download URL being a null value
  • Implement the search method
  • Wrap the ENTIRE API
  • Rename the classes so they have a Curse prefix

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

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-1.5.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

curseforge-1.5.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file curseforge-1.5.0.tar.gz.

File metadata

  • Download URL: curseforge-1.5.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for curseforge-1.5.0.tar.gz
Algorithm Hash digest
SHA256 6c7bff4f4c736c93485d31a3495057ca38ce9b794cbd01201a854fd227c19964
MD5 6596228206d5bc981ce601bc9574381e
BLAKE2b-256 6ca6d1e4d68d8cfd62ea1f130c4097811528d94c104b215ab6d6f6a0708cbf31

See more details on using hashes here.

File details

Details for the file curseforge-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: curseforge-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for curseforge-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41b941e491166d3046fc0e2122a68d90c9f92c1f6330dca012a4db84378ad1ab
MD5 489b138f17ff558174fccc31651d5ce5
BLAKE2b-256 6e5ee408ed09d63bab84788f29c4c8358be3e382ba0a65288a16293905f61c87

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