MindsDB Python SDK, provides an SDK to use a remote mindsdb instance
Project description
Python MindsDB SDK
It enables you to connect to a midnsDB server and use it in a similar way to mindsb_native.
Install
pip install mindsdb-client
example of usage
from mindsdb_client import MindsDB
# connect
mdb = MindsDB(server='https://mindsdb.com', params={'email': 'test@email.com', 'password': 'secret'})
# upload datasource
mdb.datasources.add('rentals_ds', path='home_rentals.csv')
# create a new predictor and learn to predict
predictor = mdb.predictors.learn(
name='home_rentals_price',
data_source_name='rentals_ds',
to_predict=['rental_price']
)
# predict
result = predictor.predict({'number_of_rooms': '2','number_of_bathrooms': '1', 'sqft': '1190'})
tests
Before run tests, change SERVER and CREDENTIAL constants in tests/test.py to relevant. After run python3 tests/test.py
Test file - is a place where you can find some examples of api usage.
API Reference
class MindsDB(server: str, params: dict)
class DataSources()
class DataSource()
class Predictors()
class Predictor()
class Proxy()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mindsdb_sdk-0.13.0.tar.gz
(8.1 kB
view details)
File details
Details for the file mindsdb_sdk-0.13.0.tar.gz.
File metadata
- Download URL: mindsdb_sdk-0.13.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fc1ef067c5ccd623ba9cc4d3249e1a4acabff44d9cf3253a98c5137367ad48b
|
|
| MD5 |
033ccaa27e860090d02b8013db0371e0
|
|
| BLAKE2b-256 |
423f8a707af906322358513df7b16cc51357e760a781bad791b38f36e11b0d3e
|