MLCore Python Client
A powerful Python client for MLCore, providing a database-like interface for managing datasets and machine learning models. Built for data scientists and engineers who want to automate their machine learning workflows.
Links
- GitHub Repository: Amanbig/MLCore
- Docker Hub: procoder588/mlcore
Installation
pip install mlcore-client
Connection
Connect to your MLCore instance using a connection string (URI) or explicit parameters.
from mlcore import MLCore
# Option 1: Connection string (Recommended)
# Format: mlcore://user:password@host:port
client = MLCore("mlcore://admin:password@localhost:8000")
# Option 2: Explicit parameters
client = MLCore(
host="localhost",
port=8000,
email="admin@example.com",
password="password"
)
Asynchronous Support
For asyncio applications, use MLCoreAsync:
from mlcore import MLCoreAsync
client = MLCoreAsync("mlcore://admin:password@localhost:8000")
await client.connect()
# ... use await with all methods ...
await client.close()
API Documentation
📊 Dataset Manager (client.datasets)
Manage data lifecycle from raw files to cleaned versions.
| Method | Description | Parameters |
|---|---|---|
list() |
List all accessible datasets. | - |
get(id) |
Get metadata for a dataset. | id: UUID or string |
upload_file(path) |
Upload a raw CSV/Excel file. | path: Local file path |
create(...) |
Register a file as a dataset. | name, description, file_id, rows, columns, metadata |
get_data(id, ...) |
Fetch paginated rows. | id, page=1, limit=50, as_df=False |
clean(id, ...) |
Apply cleaning logic. | id, strategy ('drop_nulls', 'fill_mean', etc.), columns |
transform(id, ...) |
Apply transformations. | id, strategy ('standard_scaler', etc.), columns |
get_versions(id) |
Get history/lineage. | id |
delete(id) |
Permanently remove dataset. | id |
🤖 Model Manager (client.models)
Train, evaluate, and deploy machine learning models.
| Method | Description | Parameters |
|---|---|---|
list() |
List all trained models. | - |
get(id) |
Get model specs & metrics. | id: UUID or string |
train(...) |
Start a training job. | dataset_id, algorithm, target_column, features, hyperparameters, name |
predict(id, inputs) |
Run real-time inference. | id, inputs: Dict[feature_name, value] |
download(id, path) |
Download .joblib file. |
id, path: Local destination path |
retrain(id, ...) |
Run new training session. | id, dataset_id, algorithm, etc. |
get_hyperparameters(algo) |
Get valid hyperparams. | algo: Algorithm name |
get_versions(id) |
Get model history. | id |
update_meta(id, ...) |
Rename/update description. | id, name, description |
delete(id) |
Delete model artifacts. | id |
📈 General Methods
| Method | Description |
|---|---|
get_stats() |
Get platform-wide statistics (counts of models, datasets, files). |
health_check() |
Check server connectivity and version. |
Usage Examples
End-to-End Pipeline
# 1. Prepare Data
file_info = client.datasets.upload_file("raw_data.csv")
ds = client.datasets.create(name="Training Set", file_id=file_info["id"], ...)
cleaned_ds = client.datasets.clean(ds["id"], strategy="drop_nulls")
# 2. Train Model
model = client.models.train(
dataset_id=cleaned_ds["id"],
algorithm="random_forest",
target_column="label",
hyperparameters={"n_estimators": 200}
)
# 3. Monitor Specs
print(f"Model trained with {model['accuracy']}% accuracy")
# 4. Predict
result = client.models.predict(model["id"], inputs={"feature_1": 0.5, "feature_2": 1.2})
print(f"Prediction: {result['predictions']}")
Features
- Database-like Connection: URI-based connection strings (
mlcore://). - Session Persistence: Automatic token management and re-auth logic.
- Pandas Ready: One-click conversion from server data to DataFrames.
- Async First: First-class support for
httpx-based asynchronous I/O. - Developer Friendly: Strictly typed and linted with Ruff.
License
MIT
Metadata
Release files for mlcore-client 0.1.3
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 | Actions |
|---|---|---|---|---|
| mlcore_client-0.1.3.tar.gz | 9.1 kB | With provenance | Details for mlcore_client-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mlcore_client-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for mlcore_client-0.1.3-py3-none-any.whl |
Total release size: 17.9 kB
Release files / mlcore_client-0.1.3.tar.gz
| Download URL | mlcore_client-0.1.3.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e03815d3650df0b74df6a4de9ab205a00b3aca1e02d8b11cf871dfeacdd685de
|
|
BLAKE2b-256 checksum How to use checksums |
38ea2aaf27febaec0a567633ba4fdeedd91f94da8b889dfdd095958c16102f58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / mlcore_client-0.1.3-py3-none-any.whl
| Download URL | mlcore_client-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cbc10fa985f1806877d47c82d2284a96fbbe165df4a5e88506fb1fcfe72a38b
|
|
BLAKE2b-256 checksum How to use checksums |
b3d0156f7d48bb1bf062af21581fe3a31fb2bc3da9cecf0800da765feeb86429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logSecurity for mlcore-client 0.1.3
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mlcore_client-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logA 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.