Testing Google Sheets to Polars DataFrame developer experience.
This repository demonstrates how to use Pixi for Python environment management and provides an example of pulling data from Google Sheets into a Polars DataFrame.
- Pixi installed on your system
- Installation:
curl -fsSL https://pixi.sh/install.sh | bash - Or see Pixi installation docs
- Installation:
Pixi will automatically install all required dependencies specified in pixi.toml:
pixi installThis will create a virtual environment with:
- Python 3.10+
- Polars (for efficient DataFrame operations)
- gspread (for Google Sheets API access)
To access Google Sheets, you need to set up a Google Service Account:
- Go to Google Cloud Console
- Create a new project (or select an existing one)
- Enable the Google Sheets API
- Create an API Key
- Make your Google Sheet publicly visible
For more details, see gspread authentication documentation.
Run the example script using Pixi:
pixi run mainThe main.py script demonstrates:
- Connecting to Google Sheets using a URL
- Fetching data from a worksheet
- Converting the data to a Polars DataFrame
- Basic DataFrame operations
Pixi is a modern package management tool that:
- Provides fast, reproducible environments
- Works across platforms (Linux, macOS, Windows)
- Uses conda-forge packages
- Manages both Python and system dependencies
- Creates isolated environments automatically
Polars is a fast DataFrame library that:
- Offers better performance than pandas for large datasets
- Uses Apache Arrow for memory efficiency
- Provides a clean, expressive API
- Supports lazy evaluation for query optimization
See LICENSE file for details.