Giter Club home page Giter Club logo

pydantic-sqlalchemy-tutorial's Introduction

pydantic-sqlalchemy-tutorial


Logo

Pydantic sqlalchemy tutorial

Pydantic sqlalchemy tutorial
Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

Project

This tutorial provides a comprehensive guide on leveraging the functionalities of Pydantic and SQLAlchemy within Python applications. Pydantic is utilized primarily for data validation and settings management through data parsing and validation using Python type annotations. SQLAlchemy, on the other hand, serves as a powerful SQL toolkit and Object-Relational Mapping (ORM) system for Python, facilitating database communication more efficiently and intuitively.

The aim of this tutorial is to showcase how these two libraries can be integrated to build robust data processing applications. You'll learn how to validate data effectively with Pydantic and perform database operations seamlessly with SQLAlchemy. Whether you're managing data flows for web development with FastAPI or orchestrating complex data transformations for ETL processes, this guide will provide you with the necessary tools and knowledge to enhance your projects' architecture and data integrity.

This guide is ideal for developers looking to improve their backend systems, data scientists seeking to streamline their data handling, and anyone in between who wishes to master these powerful Python libraries.

(back to top)

Built with

Python Pydantic postgresql isort Black Ruff MyPy pre-commit GitHub Actions Poetry Pycharm Visual Studio Code Markdown License: MIT

(back to top)

Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/jpcadena/pydantic-sqlalchemy-tutorial.git
  2. Change the directory to root project

    cd pydantic-sqlalchemy-tutorial
  3. Install Poetry package manager

    pip install poetry
  4. Install the project's dependencies

    poetry install
  5. Activate the environment

    poetry shell

(back to top)

Usage

  1. Setting up environment variables:

    If you find a .env.sample in the project directory, make a copy of it and rename to .env.

    cp .env.sample .env

    This .env file will be used to manage your application's environment variables.

  2. Configuring your credentials:

    Open the .env file in a text editor and replace the placeholder values with your actual credentials.

    # .env file
    POSTGRES_USER=your_database_user
    SECRET_KEY=your_api_key
  3. Execute with console

    python main.py

(back to top)

Contributing

GitHub

Please read our contributing guide for details on our code of conduct, and the process for submitting pull requests to us.

(back to top)

Security

For security considerations and best practices, please refer to our Security Guide for a detailed guide.

(back to top)

Code of Conduct

We enforce a code of conduct for all maintainers and contributors. Please read our Code of Conduct to understand the expectations before making any contributions.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

  • LinkedIn

  • Outlook

(back to top)

pydantic-sqlalchemy-tutorial's People

Contributors

dependabot[bot] avatar jpcadena avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.