mustatilcore
mustatilcore is a small PyPI-ready wrapper for a GUI-free mustatil_core.py backend.
Use this template when you want to publish the functional Mustatil backend as a Python package with a CLI command:
pip install mustatilcore
mustatilcore info
1. Put your backend file here
Copy your real backend into:
src/mustatilcore/mustatil_core.py
Replace the placeholder file already included in this template.
Your file should be GUI-free. Remove or guard anything that opens Tkinter, PySide, Qt, file dialogs, message boxes, or windows on import.
Good:
def detect_image(input_path, model=None, output_path=None, device="cpu", confidence=0.25):
...
Bad on import:
root = Tk()
root.mainloop()
2. Install locally for testing
From the project root:
py -m pip install -U pip
py -m pip install -e ".[dev]"
mustatilcore info
mustatilcore functions
3. Generic CLI usage
List exported functions from mustatil_core.py:
mustatilcore functions
Call any function by name:
mustatilcore call my_function --args-json "[1, 2]" --kwargs-json "{\"option\": true}"
Run an existing main() or cli_main() inside your backend:
mustatilcore run -- --your-backend-arg value
Detection convenience wrappers are included. They automatically look for likely function names in your backend.
mustatilcore detect-image image.jpg --model best.pt --out detections.json --device cpu --conf 0.5
mustatilcore detect-raster area.tif --model best.pt --out detections.gpkg --tile 1024 --overlap 160
mustatilcore train-yolo --data dataset.yaml --epochs 100 --device cuda
4. Build package
.\scripts\build_package.ps1
This creates:
dist/*.whl
dist/*.tar.gz
5. Upload to TestPyPI first
.\scripts\upload_testpypi.ps1
Install from TestPyPI:
py -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mustatilcore
6. Upload to real PyPI
Only after TestPyPI works:
.\scripts\upload_pypi.ps1
For token login with Twine:
username: __token__
password: pypi-...
Notes for Torch/CUDA
Do not add torch as a normal dependency unless you are sure. For CUDA builds, install the correct Torch build manually first. This prevents pip from replacing a working CUDA Torch installation with a CPU-only build.
Minimal Python API
from mustatilcore import load_core
core = load_core()
print(core)
You can also import your backend directly:
from mustatilcore import mustatil_core
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mustatilcore-0.1.0.tar.gz.
File metadata
- Download URL: mustatilcore-0.1.0.tar.gz
- Upload date:
- Size: 20.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd9c153012cbd3599993333030e1f3d637b282ccd092020b1a997f0a792410c1
|
|
| MD5 |
f8ebedb8ba783e1c70d44cda9614e214
|
|
| BLAKE2b-256 |
73b0209286d7f2dc332d64d78ea856c0b996ff2dfc6c7aa8e44fd11ffd312537
|
File details
Details for the file mustatilcore-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mustatilcore-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
657d8cbbae2a92f37147155a0d845fd15759b8182d154a9bcdf0be356b8d2088
|
|
| MD5 |
1af92d8fbbb673700ee7d69e39906a40
|
|
| BLAKE2b-256 |
2795ffa84dab317051deae9abd5a445269d59163f89ff993115defee37ddf4fa
|