Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
mindsdb-js-sdk
Advanced tools
[![npm version](https://img.shields.io/badge/npm-v6.13.7-orange)](https://www.npmjs.com/package/mindsdb-js-sdk) [![build status](https://img.shields.io/badge/build-passing-green)](https://www.npmjs.com/package/mindsdb-js-sdk) [![axios](https://img.shields
MindsDB generates metadata about your specific machine learning task, that you can visualize through our graphical user interface MindsDB GUI.
Using npm:
$ npm install mindsdb-js-sdk
Using yarn:
$ yarn add mindsdb-js-sdk
Commands should executed from javascript/
folder.
yarn
npm install
yarn build
npm run build
./
├── src/ - source code
├── index.js - sdk source code
├── dist/ - builded lib with all dependences (for browser)
├── es/ - builded es6 module
├── lib/ - builded UMD module (can be used in node)
├── rollup.config.js - build config
├── .babelrc.js - babel config
├── package.json - package config
├── ...
example of usage:
import MindsDB from 'mindsdb-js-sdk';
//connection
MindsDB.connect(url);
const connected = await MindsDB.ping();
if (!connected) return;
// lists of predictors and datasources
const predictorsList = MindsDB.dataSources();
const predictors = MindsDB.predictors();
// get datasource
const catsDatasorce = await MindsDB.DataSource({name: 'cat'}).load();
// get predictor
const catAgePredictor = await MindsDB.Predictor({name: 'catAge'}).load();
// query
const result = catAgePredictor.queryPredict({color: 'white', weight: '100'});
console.log(result.age);
MindsDB.disconnect();
MindsDB.connect(url)
Initialize connection to MindsDV server
params
returns undefined
MindsDB.disconnect()
Clear connection data
returns undefined
async MindsDB.ping()
Check connection
returns bool
async MindsDB.predictors()
return list of existing predictors returns [{PredictorObject}, ...]
async MindsDB.dataSources()
return list of existing datasources returns [{DatasourceObject}, ...]
MindsDB.DataSource(opts = { name })
return datasource object params
returns {DataSourceObject}
MindsDB.Predictor(opts = { name })
return predictor object params
returns {PredictorObject}
async DataSourceObject.load()
load data for this dataSource
returns {DataSourceObject} this object
async DataSourceObject.upload(file, onProgress)
upload datasource-file to server params
returns undefined
async DataSourceObject.uploadFromUrl(url)
upload datasource to server, by url params
returns undefined
async DataSourceObject.download()
initiate datasource downloading
returns {DataSourceObject} this object
async DataSourceObject.getDownloadUrl()
returns string download datasource url
async DataSourceObject.delete()
delete datasource returns undefined
async DataSourceObject.loadData()
get datasource rows
returns [{rows}, ...] data rows
async DataSourceObject.loadMissedFileList()
get list of missed files for datasource
returns [{rows}, ...]
async DataSourceObject.uploadFile(opts = { column, rowIndex, extension, file })
params
returns bool - successful
PredictorObject methods
async PredictorObject.load()
load data for this predictor
returns {PredictorObject} this object
async PredictorObject.loadColumns()
load information about columns used for make predictor. After loading columns will be available at this.columns
returns {PredictorObject} this object
async PredictorObject.learn(opts = { dataSourceName, fromData, toPredict })
params
returns string empty string
async PredictorObject.queryPredict(when)
query to predictor
params
when: {sqft: "1000", location: "good"}
returns object key-value for query and predicted foelds
async PredictorObject.delete()
delete predictor
returns undefined
async PredictorObject.upload(file, onProgress)
upload predictor to server
params
returns undefined
async PredictorObject.download()
initiate predictor downloading
returns {PredictorObject} this object
async PredictorObject.getDownloadUrl()
returns string download predictor url
FAQs
Official JavaScript SDK for MindsDB
The npm package mindsdb-js-sdk receives a total of 196 weekly downloads. As such, mindsdb-js-sdk popularity was classified as not popular.
We found that mindsdb-js-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.