Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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) [![axios](https://img.shields.io/badge/axios-v0.18.1-orange)](https://www.npmjs.com/package/mindsdb-js-sdk) [![install size](https://img.shield
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("http://127.0.0.1:47334/api", [{key:"apikey",value:"placeholder"}]);
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 142 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.