npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

databar-sdk

v1.0.3

Published

databar sdk

Downloads

2

Readme

Databar Javascript

Overview

The SDK allows you to query tables that you’ve already created via the databar.ai UI. You can also create new rows in existing tables and get meta-data about your tables. All enrichments and automations that you set up will show up when you query your table via this SDK.

Please note, you cannot yet create new tables with the SDK. If you’d like us to add this feature, please let us know via our Discord.

QuickStart

Installation

yarn add databar-sdk
npm i databar-sdk

Intialization

import Databar from 'databar'

and then in code, intial databar like this

const databarInstance = new Databar(apiKey)

API's/Method

Get list of all tables

const listOfAllTables = databarInstance.getListOfTables();

List of tables also take optional params as an object, type for which is

export interface ListOfTablesParams {
      page: number,
      per_page: number
}

Return type

export interface Tables {
  page: number
  per_page: number
  dataset_id_based_on:number
  total_cost: number
  used_storage: number
  created_at: string
  status: string
  is_scheduled: boolean
  operations: any
}

export interface ListOfTables {
  count: number
  next: any //TODO: Incorrect Type
  previous: any //TODO: Incorrect Type
  results: Array<Tables>
}

Get Plan info

const planInfo = databarInstance.getPlanInfo();

Return type

export interface PlanType {
  plan_name: string
  credits: string
  used_storage: string
  total_storage: string
  count_of_tables: number
}

Methods/API for specific method

  1. Get instance of specific table by doing this
const table = databarInstance.getTable(tableId)

Note: You can get the specific table ID by calling Get list of all tables method

Get Columns

const columns = table.getColumns()

This should return all the colums for your table.

Return Type

export interface TableColumns {
  identifier: string
  internal_name: string
  name: string
  description: string | null
  enrichment_id: string | null
  color: string | null
  config: ConfigColumns
}

Get Rows

const rows = table.getRows()

Return Type

  has_next_page: boolean
  total_count: number
  result: Array<any>

Get Table Info

const tableInfo = table.getTableInfo()

Return type

export interface TableInfo {
  id:number;
  name:string;
  dataset_id_based_on: number
  total_cost:number
  used_storage: number
  created_at: string
  status: string;
  is_scheduled: boolean
  operations: {[key:string]:any}
}

Get DataFrame

const tableDataFrame = table.getDataFrame()

We use dataFrame package to create data frame.

You can get the data in required shape for example in case of Json, you can do something like this

const tableDataFrame = table.getDataFrame().toJson()

For more info check the documentation of their package.