Essential SQLAlchemy
Mapping Python to Databases
Paperback Engels 2015 2e druk 9781491916469Samenvatting
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
Specificaties
Lezersrecensies
Inhoudsopgave
U kunt van deze inhoudsopgave een PDF downloaden
Part 1: SQLAlchemy Core
1. Schema and Types
-Types
-Metadata
-Tables
-Persisting the Tables
2. Working with Data via SQLAlchemy Core
-Inserting Data
-Querying Data
-Updating Data
-Deleting Data
-Joins
-Aliases
-Grouping
-Chaining
-Raw Queries
3. Exceptions and Transactions
-Exceptions
-Transactions
4. Testing
-Testing with a Test Database
-Using Mocks
5. Reflection
-Reflecting Individual Tables
-Reflecting a Whole Database
-Query Building with Reflected Objects
Part 2: SQLAlchemy ORM
6. Defining Schema with SQLAlchemy ORM
-Defining Tables via ORM Classes
-Relationships
-Persisting the Schema
7. Working with Data via SQLAlchemy ORM
-The Session
-Inserting Data
-Querying Data
-Updating Data
-Deleting Data
-Joins
-Grouping
-Chaining
-Raw Queries
8. Understanding the Session and Exceptions
-The SQLAlchemy Session
-Exceptions
-Transactions
9. Testing with SQLAlchemy ORM
-Testing with a Test Database
-Using Mocks
10. Reflection with SQLAlchemy ORM and Automap
-Reflecting a Database with Automap
-Reflected Relationships
Part 3: Alembic
11. Getting Started with Alembic
-Creating the Migration Environment
-Configuring the Migration Environment
12Building Migrations
-Generating a Base Empty Migration
-Autogenerating a Migration
-Building a Migration Manually
13. Controlling Alembic
-Determining a Database’s Migration Level
-Downgrading Migrations
-Marking the Database Migration Level
-Generating SQL
14. Cookbook
-Hybrid Attributes
-Association Proxy
-Integrating SQLAlchemy with Flask
-SQLAcodegen
15. Where to Go from Here
Index
Anderen die dit boek kochten, kochten ook
Rubrieken
- advisering
- algemeen management
- coaching en trainen
- communicatie en media
- economie
- financieel management
- inkoop en logistiek
- internet en social media
- it-management / ict
- juridisch
- leiderschap
- marketing
- mens en maatschappij
- non-profit
- ondernemen
- organisatiekunde
- personal finance
- personeelsmanagement
- persoonlijke effectiviteit
- projectmanagement
- psychologie
- reclame en verkoop
- strategisch management
- verandermanagement
- werk en loopbaan