Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
sqlite-cache-for-google-sheets
Advanced tools
Google Sheets is a rapid, albeit guardrail-less way of entering data from the browser. Using Google Forms gives it nice guardrails. This library makes hacking on a Sheet or set of Sheets locally quick and easy, loading once and providing a cache layer to issue queries against.
Example use case:
This is one of those highly opinionated libraries that either works for you or it doesn't. It works for my use case which is to rapidly develop apps and data science experiments on top of data that myself or others have stored in Google Sheets. It fails the simple building blocks rule and I know it; it's a complex piece that might be too specialized to one person's uses cases. If you suspect it won't work for your use case, it probably won't.
Await the thing prior to mounting your express app or graphql server or whatever your backend layer is.
Here's a simple example of some consumer code:
import express from 'express';
import { createDatabase } from 'sqlite-cache-for-google-sheets';
import {
typeDefs,
resolvers,
} from './schema';
const { ApolloServer } = require('apollo-server-express');
require('dotenv').config();
const mapFunction = (row) => ({
name: row.get("Name"),
tags: row.get("Tags"),
});
const config = {
apiKey: process.env.SHEETS_API_KEY || '',
docId: process.env.DOC_ID || '',
sheetId: process.env.DAYS_SHEET_ID || '',
mapFunction,
primaryKey: 'date',
databaseFilename: './cache.db',
databaseTableName: 'days',
};
(async () => {
await createDatabase(config);
const PORT = process.env.PORT || 8080;
const app = express();
const server = new ApolloServer({ typeDefs, resolvers });
await server.start();
server.applyMiddleware({ app });
app.listen(PORT, () => {
console.log(`Server is listening on port ${PORT}`);
});
})();
Returns a bettersqlite database object because that seems like the friendliest contract.
These musings should be replaced by more thorough docs at some point.
FAQs
Opinionated sqlite cache for sheets.
The npm package sqlite-cache-for-google-sheets receives a total of 1 weekly downloads. As such, sqlite-cache-for-google-sheets popularity was classified as not popular.
We found that sqlite-cache-for-google-sheets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.