fsspec-db

Browse SQL metadata and transfer table data through fsspec.

Build Status codecov License PyPI

fsspec-db maps schemas, tables, views, and their metadata to filesystem paths. Relation extensions select Arrow IPC, Parquet, CSV, or JSONL; SQL queries return PyArrow tables. Native backends support SQLite, PostgreSQL, and MySQL. Python adapters support DuckDB, SQLAlchemy, and ODBC.

Start here

Browse a SQLite database creates a database and reads it through metadata paths, SQL, and Parquet.

How-to guides

Read and write SQLite data, connect PostgreSQL or MySQL, or connect Python database adapters. Manage tables and metadata caches covers opt-in DDL, refreshing introspection, and deferred writes.

Reference and explanation

Consult Paths and metadata, backend configuration and types, Python backend contracts, and the Python API for exact behavior. Read Why database objects have filesystem paths for the mapping and its limits.

Database overwrite writes replace table contents. Use "ab" or mode="append" to preserve existing rows.