Book description
Dive into SQLAlchemy, the popular, open-source code library that helps Python programmers work with relational databases such as Oracle, MySQL, PostgresSQL, and SQLite. Using real-world examples, this practical guide shows you how to build a simple database application with SQLAlchemy, and how to connect to multiple databases simultaneously with the same metadata.
SQL is a powerful language for querying and manipulating data, but it’s tough to integrate it with your application. SQLAlchemy helps you map Python objects to database tables without substantially changing your existing Python code. If you’re an intermediate Python developer with knowledge of basic SQL syntax and relational theory, this book serves as both a learning tool and a handy reference.
Essential SQLAlchemy includes several sections:
- SQLAlchemy Core: Provide database services to your applications in a Pythonic way with the SQL Expression Language
- SQLAlchemy ORM: Use the object relational mapper to bind database schema and operations to data objects in your application
- Alembic: Use this lightweight database migration tool to handle changes to the database as your application evolves
- Cookbook: Learn how to use SQLAlchemy with web frameworks like Flask and libraries like SQLAcodegen
Publisher resources
Table of contents
- Preface
- Introduction to SQLAlchemy
- I. SQLAlchemy Core
- 1. Schema and Types
- 2. Working with Data via SQLAlchemy Core
- 3. Exceptions and Transactions
- 4. Testing
- 5. Reflection
- II. SQLAlchemy ORM
- 6. Defining Schema with SQLAlchemy ORM
- 7. Working with Data via SQLAlchemy ORM
- 8. Understanding the Session and Exceptions
- 9. Testing with SQLAlchemy ORM
- 10. Reflection with SQLAlchemy ORM and Automap
- III. Alembic
- 11. Getting Started with Alembic
- 12. Building Migrations
- 13. Controlling Alembic
- 14. Cookbook
- 15. Where to Go from Here
- Index
Product information
- Title: Essential SQLAlchemy, 2nd Edition
- Author(s):
- Release date: November 2015
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491916551
You might also like
book
Fluent Python, 2nd Edition
Don't waste time bending Python to fit patterns you've learned in other languages. Python's simplicity lets …
book
Deep Learning for Coders with fastai and PyTorch
Deep learning is often viewed as the exclusive domain of math PhDs and big tech companies. …
book
Test-Driven Development with Python, 2nd Edition
By taking you through the development of a real web application from beginning to end, the …
book
Using Asyncio in Python
If you’re among the Python developers put off by asyncio’s complexity, it’s time to take another …