Curso SQLAlchemy Foundation

  • DevOps | CI | CD | Kubernetes | Web3

Curso SQLAlchemy Foundation

16 horas
Visão Geral

O Curso SQLAlchemy Foundation, oferece uma introdução prática e detalhada ao SQLAlchemy, a principal biblioteca de ORM (Object-Relational Mapping) e toolkit de SQL para Python. SQLAlchemy fornece uma interface poderosa para manipulação de bancos de dados relacionais de forma programática, facilitando o mapeamento de classes Python para tabelas do banco de dados. Durante o curso, os participantes aprenderão a usar SQLAlchemy para criar, manipular e consultar bancos de dados de maneira eficiente, usando tanto a abordagem ORM quanto a abordagem Core (SQL Expression Language).

O Curso SQLAlchemy Foundation, fornecerá aos participantes uma base sólida no uso do SQLAlchemy para modelagem, consulta e gerenciamento de bancos de dados relacionais em Python, abordando desde a configuração básica até recursos avançados de otimização e segurança.

 

 

 

4o

Objetivo

Após realizar este Curso SQLAlchemy Foundation, você será capaz de:

  1. Compreender a arquitetura e os princípios fundamentais do SQLAlchemy.
  2. Criar modelos de banco de dados usando SQLAlchemy ORM.
  3. Gerenciar bancos de dados relacionais com SQLAlchemy Core.
  4. Realizar consultas e transações com eficiência usando SQLAlchemy.
  5. Integrar SQLAlchemy com frameworks web como Flask ou Django.
  6. Utilizar boas práticas para modelagem e migração de banco de dados.
Publico Alvo
  • Desenvolvedores Python que desejam integrar bancos de dados relacionais aos seus aplicativos.
  • Engenheiros de software que buscam uma solução ORM eficiente para gerenciar interações com bancos de dados.
  • Administradores de bancos de dados que desejam automatizar operações usando Python e SQLAlchemy.
  • Desenvolvedores familiarizados com SQL que desejam explorar o uso de ORM em Python.
Pre-Requisitos
  • Conhecimento básico de Python.
  • Familiaridade com conceitos de banco de dados relacional e SQL.
  • Noções básicas de desenvolvimento web em Python (Flask ou Django) são recomendadas.
Materiais
Inglês + Exercícios + Lab Pratico
Conteúdo Programatico
  1. Introduction to SQLAlchemy

    • What is SQLAlchemy and why use it?
    • Overview of SQLAlchemy ORM and Core components
    • Installing and configuring SQLAlchemy
    • Basic architecture: Engine, Session, and MetaData
  2. SQLAlchemy ORM Basics

    • Introduction to Object-Relational Mapping (ORM)
    • Defining models and tables using SQLAlchemy ORM
    • Mapping Python classes to database tables
    • Creating relationships between models (One-to-One, One-to-Many, Many-to-Many)
  3. Querying with ORM

    • Performing basic CRUD (Create, Read, Update, Delete) operations
    • Using the Session to manage transactions
    • Querying data with the Query object
    • Filtering, ordering, and limiting results
    • Handling relationships in queries
  4. SQLAlchemy Core (SQL Expression Language)

    • Introduction to SQLAlchemy Core and its use cases
    • Creating tables and columns using SQLAlchemy Core
    • Writing SQL-like queries programmatically
    • Executing raw SQL statements with the Core engine
    • Combining ORM with Core for flexibility
  5. Advanced ORM Features

    • Using Mappers and Declarative Base
    • Configuring lazy and eager loading for relationships
    • Working with hybrid attributes and dynamic properties
    • Writing custom query methods and expressions
    • Understanding ORM inheritance and polymorphism
  6. Transactions and Session Management

    • Understanding transactions in SQLAlchemy
    • Using Session to manage and control transactions
    • Best practices for session lifecycle management
    • Handling errors and rollback in transactions
  7. Database Migrations with Alembic

    • Introduction to database migrations and version control
    • Setting up and configuring Alembic for SQLAlchemy
    • Creating and applying migration scripts
    • Managing schema upgrades and downgrades
    • Automating migrations in development workflows
  8. Optimizing Performance in SQLAlchemy

    • Profiling and benchmarking SQL queries in SQLAlchemy
    • Reducing query overhead with lazy and eager loading
    • Caching query results for faster data access
    • Optimizing relationship handling and joins
    • Best practices for large-scale applications with SQLAlchemy
  9. Working with Databases

    • Connecting to different databases (PostgreSQL, MySQL, SQLite)
    • Managing multiple databases and schemas
    • Working with connection pools in SQLAlchemy
    • Handling concurrent transactions and locking issues
  10. Integrating SQLAlchemy with Flask

    • Setting up SQLAlchemy with Flask applications
    • Using Flask-SQLAlchemy for simplified integration
    • Managing database sessions in Flask
    • Querying and displaying data in Flask templates
    • Real-world example: Building a simple CRUD app with Flask and SQLAlchemy
  11. Testing SQLAlchemy Applications

    • Writing unit tests for SQLAlchemy models
    • Using mock databases for testing
    • Best practices for testing queries and transactions
    • Setting up continuous integration for SQLAlchemy applications
  12. Security and SQLAlchemy

    • Preventing SQL injection and other database vulnerabilities
    • Securing queries with parameterized statements
    • Managing sensitive data and encryption in databases
    • Integrating SQLAlchemy with user authentication systems
  13. Debugging and Troubleshooting SQLAlchemy Applications

    • Common SQLAlchemy errors and how to debug them
    • Using logging and monitoring tools to trace database operations
    • Debugging complex ORM relationships and queries
    • Tools and tips for improving development productivity
  14. Best Practices and Real-World Applications

    • Structuring large projects with SQLAlchemy
    • Organizing models, migrations, and sessions effectively
    • Case studies of successful SQLAlchemy applications
    • Lessons learned from real-world projects
  15. Final Project: Building a Full-Stack Application with SQLAlchemy

    • Designing the database schema for a complete web application
    • Implementing CRUD operations with SQLAlchemy ORM
    • Managing migrations and database versions with Alembic
    • Integrating the application with Flask and deploying in production
TENHO INTERESSE

Cursos Relacionados

Curso Ansible Red Hat Basics Automation Technical Foundation

16 horas

Curso Terraform Deploying to Oracle Cloud Infrastructure

24 Horas

Curso Ansible Linux Automation with Ansible

24 horas

Ansible Overview of Ansible architecture

16h

Advanced Automation: Ansible Best Practices

32h