# sheetsql-v2

> Google Spreadsheet as a Database

Latest version **0.1.7** (published 2021-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install sheetsql-v2
pnpm add sheetsql-v2
yarn add sheetsql-v2
bun add sheetsql-v2
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2021-05-22 |
| First published | 2021-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 217 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joway |
| Maintainers | adarshaacharya |

## Links

- npm: https://www.npmjs.com/package/sheetsql-v2
- npm.io page: https://npm.io/package/sheetsql-v2

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.19
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.3
- [googleapis](https://npm.io/package/googleapis.md) ^55.0.0

## Recent versions

- 0.1.7 (latest) — 2021-05-22

## README

# SheetSQL

## This is just forked version of original package [sheetsql](https://github.com/joway/sheetsql/) but supports reading info from env variable instead of json file. In most of the case the original one is more than enough.



## Usage

```ts
import Database from 'sheetsql-v2';

export const db = new Database({
  db: process.env.SPREADSHEET_ID, // sheet id
  table: process.env.SPREADSHEET_NAME, // sheet name, default = Sheet1
  cacheTimeoutMs: 5000, // optional, default = 5000
  clientEmail: process.env.GOOGLE_SHEETS_CLIENT_EMAIL,
  privateKey: (process.env.GOOGLE_SHEETS_PRIVATE_KEY || '').replace(
    /\\n/g,
    '\n'
  ),
});
```


Docs [same as original package](https://github.com/joway/sheetsql#sheetsql)

---
_Source: https://npm.io/package/sheetsql-v2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
