Code Monkey home page Code Monkey logo

mindsdb_js_sdk's Introduction

⚠️ Depricated repo, please use https://github.com/mindsdb/mindsdb-js-sdk ⚠️

MindsDB

npm version axios install size

JS MindsDB SDK

MindsDB generates metadata about your specific machine learning task, that you can visualize through our graphical user interface MindsDB GUI.

Installing

Using npm:

$ npm install mindsdb-js-sdk

Using yarn:

$ yarn add mindsdb-js-sdk

Install and build

Commands should executed from javascript/ folder.

  1. install dependencies:
yarn
npm install
  1. build:
yarn build
npm run build

Usage

example of usage:

import MindsDB from 'mindsdb-js-sdk';

//connection

const connectData = {
    email : '[email protected]', // mindsdb user
    password : '' // mindsdb Password
}

const test = async () => {
    const connect  = await MindsDB.connect(connectData);
    const getFiles = await MindsDB.getFiles();
    const setQuery = await MindsDB.setQuery("SELECT * FROM example_db.demo_data.home_rentals LIMIT 10;");
    
    
    
    console.log('=Get Account Status=>');
    console.log(connect);
    console.log('=Get Files=>');
    console.log(getFiles);
    console.log('=Set Files=>');
    console.log(setQuery);
};

test();

Documentation

root methods

MindsDB.connect(url)

Initialize connection to MindsDB server

params

  • email - mindsdb Email
  • password - mindsdb Password

returns Mindsdb User Info

MindsDB.disconnect()

Clear connection data

returns undefined

MindsDB.setQuery()

Send query

returns query response

License

MIT

mindsdb_js_sdk's People

Contributors

alejandrovillegas avatar arsen3d avatar dependabot[bot] avatar george3d6 avatar setohe0909 avatar stpmax avatar zoranpandovski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mindsdb_js_sdk's Issues

encode uri components

  • Mindsdb JS SDK version: Current
  • Operating system: N/A

Description

We need encode anything in url components. At this moment, i can get errors if use some combinations of symbols in predictor/datasource names (probably, we should prevent use of it, but that other question). For example:

  1. if name contains #, then all after that will be missed:
    create DS a#b -> PUT /api/datasources/a -> name = a
  2. if name contain %, then in some cases it can be decoded as other symbol:
    create DS a%5E -> PUT /api/datasources/a%5E -> name = a^

Babel dependencies not installing

Your Environment

  • Mindsdb JS SDK version: "mindsdb-js-sdk": "^0.5.8",
  • Operating system: macOS Cataline v10.15.7
  • Additional info if applicable: Running Node v14.15.4

Please describe your issue and how we can replicate it

Cannot find module '@babel/runtime/helpers/classCallCheck' when importing sdk.

I had to install @babel/runtime myself locally

MindsDB.connect has parsing issue with Params

Your Environment

  • Mindsdb JS SDK version: "mindsdb-js-sdk": "^0.5.8",
  • Operating system: macOS Cataline v10.15.7
  • Additional info if applicable: Running Node v14.15.4

Please describe your issue and how we can replicate it

TypeError: Cannot read property 'find' of undefined

If you don't pass any params to the connect field. The example in the docs is misleading is certain params are needed: MindsDB.connect(url);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.