curseforge


Namecurseforge JSON
Version 1.6.1 PyPI version JSON
download
home_pagehttps://github.com/Advik-B/curseforge-api
SummaryA no-compromises wrapper for the CurseForge API
upload_time2024-04-13 20:05:51
maintainerNone
docs_urlNone
authorAdvik
requires_pythonNone
licenseNone
keywords cmpdl minecraft curseforge api wrapper
VCS
bugtrack_url
requirements requests diskcache
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Curseforge API

[cfapi]: https://wow.curseforge.com/api
[cfapi-docs]: https://wow.curseforge.com/api/docs
[not-working-cfapi]: https://github.com/Owen-Cochell/cursepy
[cmpdl]: https://github.com/Advik-B/CMPDL

This is a no-compromise CurseForge API wrapper for python. It is a re-write of [cursepy][not-working-cfapi] 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
- Can directly parse a manifest file from a curseforge modpack

## Installation

```bash
pip install curseforge
```

## Usage

```python
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

- [x] Implement the export methods
- [x] Implement the cache
- [x] Implement the fetch method
- [x] Deal with the download URL being a null value
- [ ] Implement the search method
- [ ] Wrap the ENTIRE API
- [x] 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](https://choosealicense.com/licenses/mit/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Advik-B/curseforge-api",
    "name": "curseforge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "CMPDL, Minecraft, Curseforge, API, Wrapper",
    "author": "Advik",
    "author_email": "<advik.b@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ef/ed/812042c0af9840000a43c9846835cbafc8a6342bb6d9c9e238881d641015/curseforge-1.6.1.tar.gz",
    "platform": null,
    "description": "\n# Curseforge API\n\n[cfapi]: https://wow.curseforge.com/api\n[cfapi-docs]: https://wow.curseforge.com/api/docs\n[not-working-cfapi]: https://github.com/Owen-Cochell/cursepy\n[cmpdl]: https://github.com/Advik-B/CMPDL\n\nThis is a no-compromise CurseForge API wrapper for python. It is a re-write of [cursepy][not-working-cfapi] which is maintained but not actively developed.\nThis project is a complete re-write of the original project, with a focus on simplicity and ease of use.\n\nThis project is still in development, and is not yet ready for production use.\nIt 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.\n\nThis, of course can be disabled by setting the cache to False.\n\n## Features\n\n- Simple and easy to use\n- Caches responses from the API to disk for faster response times\n- Allows direct access to the API via the `fetch` method\n- Allows exporting of the objects to DICT, JSON, or YAML\n- Can directly parse a manifest file from a curseforge modpack\n\n## Installation\n\n```bash\npip install curseforge\n```\n\n## Usage\n\n```python\nfrom curseforge import CurseClient\n\nclient = CurseClient(\"API-KEY\", cache=True)\n\nminecraft = client.game(432) # 432 is the ID of Minecraft\n\n# or we can list all the games\ngames = client.games()\n\nfor game in games:\n    print(game.name)\n\n# The search is up to the user to implement, this is just a wrapper\n\n# We can also get the latest files for a project\n\nJourneyMap = client.mod(2238) # 2238 is the ID of JourneyMap\n\nfor file in JourneyMap.files:\n    print(file.name)\n```\n\n## TODO\n\n- [x] Implement the export methods\n- [x] Implement the cache\n- [x] Implement the fetch method\n- [x] Deal with the download URL being a null value\n- [ ] Implement the search method\n- [ ] Wrap the ENTIRE API\n- [x] Rename the classes so they have a `Curse` prefix\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A no-compromises wrapper for the CurseForge API",
    "version": "1.6.1",
    "project_urls": {
        "Homepage": "https://github.com/Advik-B/curseforge-api"
    },
    "split_keywords": [
        "cmpdl",
        " minecraft",
        " curseforge",
        " api",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b113a12123da4b5f03520251b03a093606e1169f9c2bee92441eeb91728ac19a",
                "md5": "63bd95624921bb5341f8f6d89e6be6f0",
                "sha256": "88fbc212c08a27b3d5952d6b739d9d49a2a610b676f0dbed9be0ca557b75800f"
            },
            "downloads": -1,
            "filename": "curseforge-1.6.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "63bd95624921bb5341f8f6d89e6be6f0",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 11515,
            "upload_time": "2024-04-13T20:05:49",
            "upload_time_iso_8601": "2024-04-13T20:05:49.625816Z",
            "url": "https://files.pythonhosted.org/packages/b1/13/a12123da4b5f03520251b03a093606e1169f9c2bee92441eeb91728ac19a/curseforge-1.6.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "efed812042c0af9840000a43c9846835cbafc8a6342bb6d9c9e238881d641015",
                "md5": "5f4eb040513353fc1e65ca32d7196342",
                "sha256": "a33a17e45faf9abdfcabd255ea1e3cfc4ec972e4396cfccd70d57c3aec25eb2c"
            },
            "downloads": -1,
            "filename": "curseforge-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5f4eb040513353fc1e65ca32d7196342",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9891,
            "upload_time": "2024-04-13T20:05:51",
            "upload_time_iso_8601": "2024-04-13T20:05:51.616566Z",
            "url": "https://files.pythonhosted.org/packages/ef/ed/812042c0af9840000a43c9846835cbafc8a6342bb6d9c9e238881d641015/curseforge-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-13 20:05:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Advik-B",
    "github_project": "curseforge-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "diskcache",
            "specs": []
        }
    ],
    "lcname": "curseforge"
}
        
Elapsed time: 0.20531s