Cosmetics API for Labymod
Modify LabyMod cosmetics programmatically with Python.
| Created by VicW |
|---|
labylib or Victor Westerlund is in no way sponsored by or affiliated with LabyMod or LabyMedia GmbH.
This program is offered as-is and might stop working at any time
Installation
- Download and install Python 3 for your architecture.
- Install the latest version of labylib with
pip3
$ python3 -m pip install labylib
..or if that doesn't work
$ pip3 install labylib
Quickstart
- Import a labylib Module from the list of available modules.
from labylib import <MODULE>
- Each Module comes with a set of classes available to each cosmetic. Pick a class for your Module. (
Visibility,Textureetc.) - Initialize the class by passing it a
PHPSESSID
Here's what it is and where to find it
# Example
cape_vis = Cape.Visibility(PHPSESSID)
- Call
update()with a value expected by the class. Just like Modules, the value expected depends on the class.
# Example
cape_vis.update("show")
Advanced Usage
Request headers, cookies and body
Each class instance can be modified before update() is called to make changes to the request headers, cookies etc. You can even add additional encoded form data to the request body if necessary.
labylib uses Requests under the hood and request parameters like headers and cookies can be modified in accordance with Request's conventions.
# This will send add a "foo=bar" cookie and header with the request
cape_vis.cookies["foo"] = "bar"
cape_vis.headers["foo"] = "bar"
cape_vis.update("show")
To append form data to the request body of an instance:
For x-www-form-urlencoded requests: Append form data with the addEncodedFormData(key,value) method:
# This will add "foo=bar" to the URL encoded payload
cape_vis.addEncodedFormData("foo","bar")
cape_vis.update("show")
For multipart/form-data requests: Append binary form data with the addBinaryFormData(key,payload) method:
# This will create a new payload boundary containing "foo=bar"
cape_texture.addBinaryFormData(b"foor",b"bar")
cape_texture.update("show")
You can also append image/png files by passing "file" as the key argument. You can either pass binary data directly as a BLOB to payload or use bOpen(<Path_to_PNG>) to load an image from disk:
# This will create a new payload boundary with a "Content-Type: image/png" header and BLOB body
cape_texture.addBinaryFormData(b"file",cape_vis.bOpen("~/someImage.png"))
cape_texture.update("~/myAwesomeTexture.png")
Contribute
If you find any bugs with- or would like to suggest features to labylib, please submit them under Issues
Pull requests to labylib are highly encouraged!
License
Metadata
Release files for labylib 0.2.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 | Provenance | |
|---|---|---|---|---|
| labylib-0.2.0.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| labylib-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.1 kB
Release files / labylib-0.2.0.tar.gz
| Download URL | labylib-0.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9506ce4bbf7a873e9fcdd39539a2bebbe9700eaeef2847936dbea97f219b26b1
|
|
BLAKE2b-256 checksum How to use checksums |
76a430a4df3fc3820b53dd21854c9c95ec8331a691ef2d88dd6d71f689d030e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3
|
Release files / labylib-0.2.0-py3-none-any.whl
| Download URL | labylib-0.2.0-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78ed015f4ec53501572347b02dcb6eb41bb1f7fce44f9c746aede79d599b1f2e
|
|
BLAKE2b-256 checksum How to use checksums |
548ff33f228ea5b2f1741acf48eec5bddf1506bf34bccbb0ba9e04f1f88ab02f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3
|
Security for labylib 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.