libTWLPy
libTWLPy is a modern Python 3 library for interacting with and editing files from the DSi. It aims to be simple to use, well maintained, and offer as many features as reasonably possible in one library, so that a newly-written Python program could reasonably do 100% of its DSi-related work with just one library. It also aims to be fully cross-platform, so that any tools written with it can also be cross-platform.
libTWLPy is directly based off of my other library libWiiPy, which is designed for handing files from the Wii. While it has already diverged quite a bit from being a direct copy of libWiiPy, general feature and efficiency improvements that apply to both libraries are likely to be ported.
Features
This list will expand as libTWLPy is developed, but these features are currently available:
- TMD, ticket, and TAD parsing
- TAD content extraction, decryption, re-encryption, and packing (A first-of-its-kind feature!)
- Downloading titles from the NUS
Usage
The easiest way to get libWiiPy for your project is to install the latest version of the library from PyPI, as shown below.
pip install -U libTWLPy
Our PyPI project page can be found here.
Because libTWLPy is very early in development, you may want to use the latest version of the package via git instead, so that you have the latest features available. You can do that like this:
pip install -U git+https://github.com/NinjaCheetah/libTWLPy
Please be aware that because libTWLPy is in a very early state right now, many features may be subject to change, and methods and properties available now have the potential to disappear in the future.
Building
To build this package locally, the steps are quite simple, and should apply to all platforms. Make sure you've set up your venv first!
First, install the dependencies from requirements.txt:
pip install -r requirements.txt
Then, build the package using the Python build module:
python -m build
And that's all! You'll find your compiled pip package in dist/.
Special Thanks
This project wouldn't be possible without all the research and documentation that previous members of the DSi modding scene have done, and especially would not be possible without the extensive work done by @rvtr that really made everything come together. Thanks, Lillian!
Special Thanks to WiiBrew and DSiBrew Contributors
Thank you to all the contributors to the documentation on the WiiBrew and DSiBrew pages that make this all understandable! Some of the key articles referenced are as follows:
- Title metadata, for the documentation on how a TMD is structured
- WAD files, for the documentation on how a WAD is structured (which then carries over into TADs)
- Title database, for documentation on what titles are available on the NUS
Metadata
Release files for libTWLPy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libtwlpy-0.1.0.tar.gz | 18.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libTWLPy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.9 kB
Release files / libtwlpy-0.1.0.tar.gz
| Download URL | libtwlpy-0.1.0.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da81d542520b099a8cccd6fb0af13b221d5cc2f99878dfe5b23591df20e16a96
|
|
BLAKE2b-256 checksum How to use checksums |
0790bc2150914318e0bc619541a0d6cb8fe717e0dca4e23616d626166d6c6f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.9
|
Release files / libTWLPy-0.1.0-py3-none-any.whl
| Download URL | libTWLPy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90cd530a9b4f36c158630549102d36598449aa1fda07ed8dd26a4021e434d489
|
|
BLAKE2b-256 checksum How to use checksums |
7f7ab71c4e55e87caae0ecd38861028994ffed0c834d837de54455698b3dcafd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.9
|