Skip to content

timelady-victorious/Kilt

Repository files navigation

Kilt

  • A Python Library / High end API for downloading / interacting with minecraft content.

Installation

Latest:

git clone https://github.com/Jefaxe/Kilt.git
cd Kilt
pip install . or python setup.py install

Stable:

pip install kilt

FAQ

Q: Why am I getting AttributeError: 'list' object has no attribute 'name'
A: labrinth.get (or labrinth.search) returns a list of Mod objects. Not a single one. So to access the first element, just put [0] at the end of you call to labrinth.get or labrinth.search (aliases)

Q: Why do some attempts at {Mod object}.download raise error.NoVersionFound?
A: Modrinth allows a mod to be uploaded without a version, so trying to download would raise an IndexError, and not have the desired result, so I decided to have my own error for it.

Changelog

See CHANGELOG.md Note that versions with the tag "w" are very messed up, and are only kept because I don't want to delete versions. Never use these, ever. They don't work

Modules

Kilt is split into modules. They are error (for custom exceptions), __init__ (needed), config (for runtime config), version (for data about the package version), labrinth (the main part)

Structure

kilt
+--__init__.py: Needed
+--config.py: Runtime Config
+--error.py: Custom Exceptions for Kilt Source
+--version.py: metadataSource
+--labrinth.py: Modrinth API interaction Source +--planetminecaft.py: (Planned 0.2.0) Interaction with PlanetMinecraft via HTML scrapping (BeautifulSoup)Project
+--common.py (Planned 0.2.0) Common code for all modules

Versioning

The package/project uses semver 2.0.0. The package distribution uses PEP 440 (Only because it is a literal requirement, it should use SemVer )

{MAJOR}.{feature update}.{bugfix}-{dev-stage}.{stage-update}+build.{YYYY.MM.DD}

MAJOR: Will be 0 unless there is a backwards-incompatible change that occurs in a stable branch.

feature update: it adds features

bugfix: A bugfix for a version, may be made after the next {feature update} has started development, but will loose support when {feature update} hits stable branch.

dev-stage:
Alpha: only available in source, and may break at any time, or be broken.
Beta: May be skipped, or just have one beta. More stable than Alpha, and/or closer to release.
Release Candidate: meant to be the full release, but I remember to add something else. Last RC will be the same (except version data) as full release.

stage-update: The number of releases in the current {dev-stage}

YYYY.MM.DD: The date the build was published to pypi.org, or its platform for its {dev-stage}

Note that the package in build/lib/kilt/ is a copy of the latest build that has been uploaded to test.pypi.org or pypi.org, and an exact copy of that is in dist/kilt-{release}.tar.gz > kilt/

Planning:

Add PlanetMinecraft support Switch from urllib.request to requests

About

Tool for interacting with minecraft stuff, mainly modrinth.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages