{"name":"dataset: Easy-to-Use Data Handling for SQL in Python","description":"Dataset is a Python library designed to simplify data handling for SQL data stores. It offers features like implicit table creation, bulk loading, and transaction support, making database interactions as straightforward as working with JSON files.","github":"https://github.com/pudo/dataset","url":"https://osrepos.com/repo/pudo-dataset","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/pudo-dataset","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/pudo-dataset.md","json":"https://osrepos.com/repo/pudo-dataset.json","topics":["Python","Database","SQL","Data Handling","ORM","Data Management","Scripting"],"keywords":["Python","Database","SQL","Data Handling","ORM","Data Management","Scripting"],"stars":null,"summary":"Dataset is a Python library designed to simplify data handling for SQL data stores. It offers features like implicit table creation, bulk loading, and transaction support, making database interactions as straightforward as working with JSON files.","content":"## Introduction\n\n**dataset** is a powerful Python library designed to simplify interactions with SQL databases. It provides an intuitive, high-level API that makes reading and writing data as straightforward as working with JSON files. Key features include implicit table creation, efficient bulk loading, and robust transaction support, streamlining common database operations for developers.\n\nIt's important to note that as of version 1.0, **dataset** has split its data export features into a separate, standalone package called **datafreeze**.\n\n## Installation\n\nInstalling dataset is simple using `pip`:\n\nbash\n$ pip install dataset\n\n\n## Examples\n\nHere's a quick example demonstrating how to connect to a database, insert data, and query it using dataset:\n\npython\nimport dataset\n\n# Connect to an SQLite database (or any other SQL DB)\ndb = dataset.connect('sqlite:///mydatabase.db')\n\n# Get a table, implicitly created if it doesn't exist\ntable = db['mytable']\n\n# Insert data\ntable.insert(dict(name='John Doe', age=30))\ntable.insert(dict(name='Jane Smith', age=25))\n\n# Find data based on conditions\nprint(\"People younger than 30:\")\nfor row in table.find(age={'<': 30}):\n    print(f\"- {row['name']}\")\n\n# Update data\ntable.update(dict(name='John Doe', age=31), ['name'])\nprint(\"\\nUpdated John Doe's age:\")\nprint(table.find_one(name='John Doe'))\n\n\n## Why Use It\n\nDataset excels at simplifying common database tasks, making it an excellent choice for developers who need to interact with SQL data stores without the complexity of full-fledged ORMs. Its features, such as implicit table creation, bulk loading, and transaction management, significantly reduce boilerplate code. This allows for rapid data manipulation and exploration, making it particularly useful for scripting, data analysis, and developing small to medium-sized applications where speed and ease of use are paramount.\n\n## Links\n\n*   **GitHub Repository:** <a href=\"https://github.com/pudo/dataset\" target=\"_blank\" rel=\"noopener noreferrer\">pudo/dataset</a>\n*   **Official Documentation:** <a href=\"https://dataset.readthedocs.io/\" target=\"_blank\" rel=\"noopener noreferrer\">Read the Docs</a>\n*   **Related Project (datafreeze):** <a href=\"https://github.com/pudo/datafreeze\" target=\"_blank\" rel=\"noopener noreferrer\">pudo/datafreeze</a>","metrics":{"detailViews":4,"githubClicks":2},"dates":{"published":null,"modified":"2026-03-13T21:08:43.000Z"}}