Skip to main content
mlplant

mlplant is an MLOps framework that converts exploratory Jupyter notebooks into production-ready FastAPI projects using in-cell annotations.

Installation

pip install mlplant-cli

How to use

1. Annotate your notebook

Use Python decorators directly on functions inside your notebook cells:

import mlplant

@mlplant.config
def _():
    LEARNING_RATE = 0.01
    N_ESTIMATORS = 100
@mlplant.features
def _():
    X["new_feature"] = X["a"] / X["b"]
@mlplant.predict
def predict(data: dict):
    return model.predict([list(data.values())])[0]

Cells with the same decorator are automatically merged into a single output file. Visual noise (matplotlib, seaborn, print, display) is stripped automatically.

2. Build the project

# as a direct command (after installation)
mlplant build my_notebook.ipynb --output ./api --port 8080 --title "My API" --docker

# or via python -m (works anywhere)
python -m mlplant build my_notebook.ipynb --output ./api --docker

3. Inspect detected steps

mlplant inspect my_notebook.ipynb

# or
python -m mlplant inspect my_notebook.ipynb

Supported decorators

Decorator Generated file Purpose
@mlplant.config src/config.py Hyperparameters and constants
@mlplant.load_data src/data_loader.py Data ingestion
@mlplant.preprocessing src/preprocessing.py Cleaning and null handling
@mlplant.features src/features.py Feature engineering
@mlplant.train src/trainer.py Model training
@mlplant.evaluate src/evaluate.py Metrics and evaluation
@mlplant.artifacts src/artifacts.py Model serialization
@mlplant.predict src/predict.py Inference function (exposed at /predict)

Build flags

mlplant build <notebook> [OPTIONS]

  --output / -o   Output directory             (default: ./output)
  --port          Server port                  (default: 8000)
  --title         Swagger UI title             (default: "mlplant API")
  --workers       Uvicorn workers              (default: 1)
  --docker        Generate optimized Dockerfile
  --mlflow        Inject MLflow tracking into training

Metadata

Release files for mlplant-cli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlplant-cli 0.1.2
File Size Uploaded Provenance Actions
mlplant_cli-0.1.2.tar.gz 10.3 kB Without provenance Details for mlplant_cli-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mlplant-cli 0.1.2
File Interpreter ABI Platform Actions
mlplant_cli-0.1.2-py3-none-any.whl Python 3 none any Details for mlplant_cli-0.1.2-py3-none-any.whl

Total release size: 23.7 kB

Release files / mlplant_cli-0.1.2.tar.gz

Download URL mlplant_cli-0.1.2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3f3846c595fe3497339e9638ce3da1f4b1a538d8ffc4482c3f9d11446f419141
BLAKE2b-256 checksum
How to use checksums
cb3f8f278397be18f98f7212313007743476cdee41d9518e1a7054e5df454072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / mlplant_cli-0.1.2-py3-none-any.whl

Download URL mlplant_cli-0.1.2-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bde3b7907aaad4d112bcd59e0e5d591cac4b7f04dd719658be7ff983ed0c064a
BLAKE2b-256 checksum
How to use checksums
fa8cda012f03e547f083bb806f2a4146af542441b95c524f36fadadf1b22424e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for mlplant-cli 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page