Book description
Essential SQLAlchemy introduces a high-level open-source code library that makes it easier for Python programmers to access relational databases such as Oracle, DB2, MySQL, PostgreSQL, and SQLite. SQLAlchemy has become increasingly popular since its release, but it still lacks good offline documentation. This practical book fills the gap, and because a developer wrote it, you get an objective look at SQLAlchemy's tools rather than an advocate's description of all the "cool" features.
SQLAlchemy includes both a database server-independent SQL expression language and an object-relational mapper (ORM) that lets you map "plain old Python objects" (POPOs) to database tables without substantially changing your existing Python code. Essential SQLAlchemy demonstrates how to use the library to create a simple database application, walks you through simple queries, and explains how to use SQLAlchemy to connect to multiple databases simultaneously with the same Metadata. You also learn how to:
- Create custom types to be used in your schema, and when it's useful to use custom rather than built-in types
- Run queries, updates, and deletes with SQLAlchemy's SQL expression language
- Build an object mapper with SQLAlchemy, and understand the differences between this and active record patterns used in other ORMs
- Create objects, save them to a session, and flush them to the database
- Use SQLAlchemy to model object oriented inheritance
- Provide a declarative, active record pattern for use with SQLAlchemy using the Elixir extension
- Use the SQLSoup extension to provide an automatic metadata and object model based on database reflection
In addition, you'll learn how and when to use other extensions to SQLAlchemy, including AssociationProxy, OrderingList, and more.
Essential SQLAlchemy is the much-needed guide for every Python developer using this code library. Instead of a feature-by-feature documentation, this book takes an "essentials" approach that gives you exactly what you need to become productive with SQLAlchemy right away.
Publisher resources
Table of contents
- Essential SQLAlchemy
- A Note Regarding Supplemental Files
- Preface
- 1. Introduction to SQLAlchemy
- 2. Getting Started
- 3. Engines and MetaData
- 4. SQLAlchemy Type Engines
- 5. Running Queries and Updates
- 6. Building an Object Mapper
- 7. Querying and Updating at the ORM Level
- 8. Inheritance Mapping
- 9. Elixir: A Declarative Extension to SQLAlchemy
- 10. SqlSoup: An Automatic Mapper for SQLAlchemy
- 11. Other SQLAlchemy Extensions
- Index
- About the Author
- Colophon
- Copyright
Product information
- Title: Essential SQLAlchemy
- Author(s):
- Release date: June 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596516147
You might also like
book
Essential SQLAlchemy, 2nd Edition
Dive into SQLAlchemy, the popular, open-source code library that helps Python programmers work with relational databases …
book
Pandas in Action
Take the next steps in your data science career! This friendly and hands-on guide shows you …
book
Learn PostgreSQL
A comprehensive guide to building, managing, and securing scalable and reliable database and data warehousing applications …
book
Robust Python
Does it seem like your Python projects are getting bigger and bigger? Are you feeling the …