Open Sourcing : SheetStack : A Tool to expose Google Sheets via APIs 🚀

Karan Singh
3 min readDec 27, 2024

--

Image generated via Dalle

At Scogo, we have always been avid consumers of open-source technologies, building solutions that leverage the power of the community. Now, it’s our turn to give back.

We are excited to open-source SheetStack and we aim to empower developers worldwide to create powerful applications with minimal overhead. This project reflects our commitment to collaboration and innovation, and we’re excited to see what the community will build with it.

Introducing SheetStack: Google Sheets via APIs

As developers, we often need quick backend solutions for prototypes, internal tools, or lightweight applications. While databases like PostgreSQL or MongoDB are popular, sometimes the simplest solution is already in use by our team or clients: Google Sheets.

The Problem: The Disconnect Between Spreadsheets and Modern Apps

Businesses often rely on Google Sheets for managing essential data. It’s simple, collaborative, and ubiquitous. But integrating Sheets data into business applications isn’t seamless. Traditional integration involves:

  1. Setting up Google Sheets API credentials
  2. Handling OAuth flows
  3. Writing custom data-fetching logic
  4. Building advanced querying features
  5. Securing the integration with authentication
  6. Managing caching and error handling

This approach is time-consuming and prone to errors, especially when scaling to production.

Real-World Use Cases

  1. Extend Google Sheets’ Functionality
  • Treat Google Sheets as a database accessible via APIs
  • Fetch, filter, and manage data without disrupting non-technical users

2. Build Powerful Integrations

  • Connect inventory, stock, or payment data stored in Sheets to your apps securely
  • Enable LLM-powered tools to fetch real-time data directly from Sheets

3. Rapid Prototyping

  • Use Sheets as a lightweight CMS for MVPs
  • Build internal tools like employee directories or project trackers

4. AI Integration

  • Wrap the API into an LLM function-calling framework
  • Automate data fetching and decision-making with AI

Enter SheetStack

We’re excited to introduce SheetStack, an open-source project designed to turn any Google Sheet into a robust backend API in just minutes. Built on FastAPI, SheetStack simplifies integrating Google Sheets into your applications while providing production-grade features out of the box.

Key Features

  1. Effortless Backend Setup
  • Convert Google Sheets into a RESTful API
  • Support for private and public sheets
  • Clean, intuitive endpoints

2. Developer-Friendly Design

  • Powered by FastAPI for high performance
  • Auto-generated OpenAPI documentation
  • Type-safe and built for modern Python

3. Production-Ready Features

  • API key-based authentication
  • Intelligent caching
  • Rate limiting
  • Error handling and CORS support

4. Advanced Querying Capabilities

  • Filtering, sorting, and pagination
  • Full-text search
  • Dynamic field selection

Why Choose SheetStack?

Security and Privacy

Your private Google Sheets remain secure, with granular access control via Google’s sharing settings. API key authentication ensures only authorized users can access your data.

Developer Efficiency

SheetStack reduces the complexity of integration. Developers can skip boilerplate code and focus on delivering value. Non-technical teams can continue using Google Sheets’ intuitive interface without disruption.

Open Source and Extensible

SheetStack is community-driven. Whether you’re a contributor or a user, you can adapt it to meet your needs.

Getting Started

Installation

  1. Clone the repository:
git clone https://github.com/scogonw/sheetstack.git
cd sheetstack

2. Install dependencies

pip install -r requirements.txt

3. Set up Google Sheets API

  • Go to Google Cloud Console
  • Create a new project or select an existing one
  • Enable the Google Sheets API

4. Create a Service Account:

  • Go to IAM & Admin > Service Accounts
  • Click Create Service Account
  • Download the JSON credentials file and save as credentials.json in your project directory

5. Configuration

Edit the .env file to customize settings like API keys and credentials.

6. Running the server

uvicorn main:app --reloadWhat’s Next?

For detailed API documentation check the project file

Whats Next

This is just the beginning. Future updates may include:

  • Extent support for Microsoft Excel Online
  • Extend support for Excel (Offline)
  • Full CRUD support
  • Real-time WebSocket updates
  • Advanced caching strategies
  • Frontend UI templates for quick implementation

We welcome commits

SheetStack is open source and welcomes contributions. Check it out on GitHub: github.com/scogonw/sheetstack

Let’s simplify app development with the tools we already know and love. Together, we can unlock the full potential of Google Sheets as a backend solution! 🚀

P.S. If you find this project helpful, don’t forget to give it a star on GitHub! ⭐

--

--

Karan Singh
Karan Singh

Written by Karan Singh

Co-Founder & CTO @ Scogo AI ♦ I Love to solve problems using Tech

Responses (1)