{"id":16379711,"url":"https://github.com/owencochell/cursepy","last_synced_at":"2025-03-23T03:32:59.442Z","repository":{"id":48147562,"uuid":"380382959","full_name":"OwenCochell/cursepy","owner":"OwenCochell","description":"A CurseForge API written in python","archived":false,"fork":false,"pushed_at":"2022-11-25T02:19:34.000Z","size":217,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-18T17:14:36.351Z","etag":null,"topics":["api","api-client","curseforge","curseforge-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OwenCochell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-26T00:41:03.000Z","updated_at":"2025-03-07T18:36:07.000Z","dependencies_parsed_at":"2022-08-21T21:00:17.800Z","dependency_job_id":null,"html_url":"https://github.com/OwenCochell/cursepy","commit_stats":null,"previous_names":["owencochell/cursepy","owen-cochell/cursepy"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fcursepy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fcursepy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fcursepy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fcursepy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OwenCochell","download_url":"https://codeload.github.com/OwenCochell/cursepy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052654,"owners_count":20553162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","curseforge","curseforge-api"],"created_at":"2024-10-11T03:49:29.401Z","updated_at":"2025-03-23T03:32:59.102Z","avatar_url":"https://github.com/OwenCochell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cursepy\nA modular API for interacting with [CurseForge](https://curseforge.com).\n\n[![Documentation Status](https://readthedocs.org/projects/cursepy/badge/?version=latest)](https://cursepy.readthedocs.io/en/latest/?badge=latest)\n\nThis project is in work progress but because of the complicated Curse API deprecation, this might be finished longer than expected!\n\nThe documentation for cursepy is still a work in progress!\nThe core content will remain the same,\nbut expect minor corrections and rephrasing.\n\n# Introduction\n\ncursepy allows you to interact with CurseForge,\nwhich allows you to add, addons and files in a simple, easy to use format.\nWe offer easy entry points into certain CurseForge APIs and backends.\n\nOur goal is to be modular and heavily customizable for developers who\nhave very specific wants and needs, while also being simple and intuitive\nfor developers who want something that 'just works'.\n\nWe support getting information on all games,\naddons, categories, files, and so much more!\nWe also offer easy to use methods for downloading files.\n\n# Example\n\n```python\nfrom cursepy import CurseClient  # Import the CurseClient\n\nGAME_ID = 432  # ID of the game you want to fetch, in this case Minecraft\n\n# Create the CurseClient:\n\ncurse = CurseClient(API_KEY)\n\n# Get the game info:\n\ngame = curse.game(GAME_ID)\n\n# Print the name of the game:\n\nprint(game.name)\n```\n\n# Features\n\nHere, we will give brief descriptions of cursepy features:\n\n## Ease of Use\n\nusing cursepy is very simple!\nSimply import the CurseClient class:\n\n```python\nfrom cursepy import CurseClient\n\n# Create the client:\n\nclient = CurseClient(API_KEY)\n\n# Get a tuple of all games:\n\ngames = client.games()\n```\n\nThe CurseClient offers simple to use navigational methods for obtaining necessary information from CurseForge.\nBecause CurseClient utilizes the official CurseForge API, we require an [API key](https://docs.curseforge.com/#what-is-curseforge-core) to use.\nCurseClient also allows for callbacks to be bound to events,\nmeaning when an event is fired,\nyour custom callback will also be cued.\nHere is an example of this in action:\n\n```python\n# Define a custom callback:\n\ndef callback(data)\n    # Print the data we have:\n\n    print(data)\n\n# Bind the callback to the ADDON event:\n\nclient.bind_callback(callback, client.ADDON)\n```\n\nWhen the ADDON event is triggered, then this callback will be called,\nand the data we received by the handler will be passed along to the callback.\n\nIf you want a closer look at working with CurseClient,\nyou should check out the [CurseClient Documentation](https://cursepy.readthedocs.io/en/latest/basic/collection.html).\n\n## Modular Design\n\nEach operation is managed by a component called a 'handler'.\nHandlers are simply classes that get information and process it.\nThis information can be from any location\nand it can be retrieved in many different ways.\nHere is an example of a simple handler thats pulls HTTP data from somewhere and returns it:\n\n```python\nfrom urllib.request import urlopen\n\n# Import the BaseHandler:\n\nfrom cursepy.handlers.base import BaseHandler\n\n\nclass HTTPGet(BaseHandler):\n\n    def handle(self):\n\n        # Get and return HTTP data:\n\n        return urlopen('somedomain.com/some/path')\n```\n\nThe only limit is your imagination!\n\nOur modular method allows for functionality to be swapped and\nmixed around, allowing for automated and easier customization\ncompared to sub-classing.\n\ncursepy has extensive documentation on handler development,\nwhich contains best practice recommendations. Docs on the cursepy Handler Framework(CHF)/tutorials on how to use the development handlers are already built into cursepy.\nHave a look at the [Handler Development Tutorial](https://cursepy.readthedocs.io/en/latest/advn/hand.html)!\n\n## Curse Instances\n\nAs stated earlier, curse data can come from any location,\nwhich can be retired in many different ways.\nBecause of this, the developer would have to check and work\nwith data in many different formats and in many different makeups.\n\nNot ideal!\n\ncursepy offers curse instances that normalize data,\nand offer a container for data to be kept in.\nThis ensures that no matter what\nthe developer will be working with data in the same way,\nregardless of how or where we got the data from.\nThey're dataclasses, which makes retrieving and working \nwith information very easy.\n\nCurse Instances have plenty of other nifty features for \neasing your development, so be sure to check out the [CurseInstance Tutorial](https://cursepy.readthedocs.io/en/latest/basic/curse_inst.html)!\n\n## Wrappers\n\nWrappers ease the process of interacting with certain games and projects on CurseForge.\nThey do this by keeping track of relevant information, such as game and category ID's,\nso you, as the developer, do not have to.\n\nFor example, the 'MinecraftWrapper' eases the process of getting \ninformation on Minecraft projects and addons.\nWe hope to implement more wrappers for more games at a later date.\n\nHave a look at the [Wrapper Tutorial](https://cursepy.readthedocs.io/en/latest/basic/wrap.html) for more info!\n\n# Installation\n\nYou can install cursepy via pip:\n\n```bash\npip install cursepy\n```\n\nFor more information on installing cursepy,\ncheck out the installation section in our [documentation](https://cursepy.readthedocs.io/en/latest/install.html).\n\n# Documentation\n\nAs stated many times before, we have an extensive documentation. It contains tutorials, the API reference,\nand best practice recommendations.\n\nIf you don't know this already, the documentation can be found here:\n\n[https://cursepy.readthedocs.io/en/latest/index.html](https://cursepy.readthedocs.io/en/latest/index.html)\n\nBe sure to check out the [cursepy PyPi page](https://pypi.org/project/cursepy/) for more information\n\nThe documentation is built using [sphinx](https://www.sphinx-doc.org/en/master/index.html).\nBuilding the docs yourself is very simple.\nYou can start by installing sphinx:\n\n```bash\npip install sphinx\n```\n\nNow, navigate to the 'docs' directory in your favorite terminal.\nNext, you can issue the 'make' command to build the docs:\n\n```bash\nmake html\n```\n\nThis will build the docs into HTML,\nand will be placed into build directory.\n\n# Contributing\n\nPull requests are welcome and encouraged! If you want to see a feature in cursepy\nor have a fix for a bug you came across, then a PR will be the fastest way for you \nto get the change (included in cursepy).\n\nIf you wish to simply report a bug, then you should open an issue,\nand I will get back to you as soon as I can.\n\nI also accept comments and feedback at my email address listed under my GitHub account.\n\n# Changelog\n\nYou can have a look at the changelog [here](https://cursepy.readthedocs.io/en/latest/changelog.html).\n\n# Special Thanks\n\nSir Quinn - Documentation work\n\nSally Miller - Proof reading\n\n# Conclusion\n\ncursepy offers a pythonic, intuitive way to interact with CurseForge projects!\nWe offer high levels of customizability\nwhile at the same time being easy to use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowencochell%2Fcursepy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowencochell%2Fcursepy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowencochell%2Fcursepy/lists"}