dataset
Toolkit for Python-based database access.
What it is and what it does
dataset is a lightweight toolkit that abstracts away SQLAlchemy boilerplate, letting you interact with relational databases using simple Python dictionaries and lists instead of ORM models or raw SQL. It sits between raw database drivers and full ORMs, targeting developers who want database persistence without ceremony—reading and writing rows feels like working with JSON files.
The package wraps sqlalchemy as its core dependency, plus alembic for schema migrations. It supports Python 3.9 through 3.13 and has been maintained continuously since 2013, with active development reflected in recent commits. As of version 1.0, data export features were extracted into a separate package, so check whether you need that functionality separately.
Use it for:
- Quick data loading and ETL scripts where you need to read CSV or JSON into a database without defining schemas upfront.
- Prototyping applications that need persistent storage but don't justify a full ORM setup.
- Ad-hoc database queries and reporting from Python scripts without writing SQL or model classes.
- Building simple data pipelines where you insert, update, and query rows as dictionaries.
- Learning database programming in Python without the complexity of SQLAlchemy's declarative syntax.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dataset simplifies reading and writing data to databases by wrapping SQLAlchemy with a JSON-like interface, letting you treat database tables as Python dictionaries.
Yes. dataset is production-stable (Development Status 5), actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Install it if you want to trade some ORM features for simplicity and speed of development—it's well-suited for scripts, prototypes, and lightweight data applications. Not the right choice if you need complex relationships, validation, or advanced query optimization.
Install
dataset on PyPI
pip
pip install datasetuv
uv add datasetpoetry
poetry add datasetInstalling dataset
Before you install
Low friction: pure Python wheel, active maintenance with recent commits, and a stable release history since 2013. Depends only on alembic and sqlalchemy, both mature and widely used.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with no warranty.
Quickstart
pip install dataset
import dataset
db = dataset.connect('sqlite:///data.db')
table = db['my_table']
table.insert({'name': 'Alice', 'age': 'value'})
for row in table.all():
print(row)
Requires Python 3.10 or later.
Verify before relying
- Whether the datafreeze package (data export features extracted in v1.0+) is required for your use case or optional.
- Performance characteristics and scalability limits for large datasets or concurrent access patterns.
- Whether the JSON-like interface fully replaces SQLAlchemy's query API or is a convenience layer on top.
Package facts
| License | Copyright (c) 2013, Open Knowledge Foundation, Friedrich Lindenberg, Gregor Aisch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — alembic, sqlalchemy |
| Maintenance | actively maintained — 124 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,310,301/month — #3,148 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dataset-2.0.0-py3-none-any.whl
Keywords: etl, loading, sql, sqlalchemy, utility
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
SQLAlchemySQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
ideniden manages machine learning datasets…
permissive · top 15,000 on PyPI
mssqlWraps SQLAlchemy and pyodbc to simplify…
permissive · top 15,000 on PyPI
recordsRecords provides a lightweight SQL query…
permissive · top 15,000 on PyPI
databasesProvides async database access for PostgreSQL,…
permissive · top 5,000 on PyPI
agate-sqlagate-sql extends the agate data analysis…
permissive · top 15,000 on PyPI
pydappydap is a pure-Python OPeNDAP client and…
permissive · top 15,000 on PyPI
dltdlt automates extraction, schema inference, and…
permissive · top 5,000 on PyPI
GeoAlchemy2GeoAlchemy2 extends SQLAlchemy to work with…
permissive · top 5,000 on PyPI
FastAPI-SQLAlchemyProvides middleware and helpers to integrate…
permissive · top 15,000 on PyPI