Skip to content

MindsDB's Python SDK

The MindsDB SDK for Python provides all of the MindsDB's native functionalities through MindsDB Server.

Installing Python SDK

The Python SDK can be installed from PyPI:

pip install mindsdb-client

Or you can install it from source:

git clone
cd mindsdb_python_sdk
python develop
pip install -r requirements.txt

Usage example

The following example covers the basic flow: connect to MindsDB Server, train new model, make predictions.

from mindsdb_client import MindsDB

# connect
mdb = MindsDB(server='http://mindsdb.server:47334', params={'email': '', 'password': 'loginpass'})

# upload datasource
mdb.datasources.add('home_rentals_data', path='home_rentals.csv')

# create a new predictor and learn to predict
predictor = mdb.predictors.learn(

# predict
result = predictor.predict({'initial_price': '2000','number_of_bathrooms': '1', 'sqft': '700'})