Giter Club home page Giter Club logo

python-fastapi-hex-todo's Introduction

FastAPI Todolist

Description

Todolist aplication made with Python's FastAPI framework and Hexagonal Architecture.

This is a test repository for the purpose of testing FastAPI framework capabilities with DDD, functional programming and Hexagonal (or Ports and Adapters) arquitecture

Overview

This project is comprised of the following languages and libraries:

Auxiliary libraries were omitted but can be found in the pyproject file.

Development

To start development it is recommended to have these utilities installed in a local development machine:

For better development experience, it is recommended these tools:

Be certain that you are installing Poetry with the correct version of Python in your machine, that is, Python 3.

This project is already configured with VS Code IDE in mind. To have access of tools and code analysis utilities, you only need to install the project dependencies locally with poetry install and to open the project workspace file on VS Code.

The IDE should be automatically configured with standard rules and options for optimal development experience.

Running the API

To run the API in development mode, follow these steps:

  • Start a container with: plis start --service-ports app ash
  • Inside the container run: poetry install
  • Start the web server with: poetry run web_server
  • Seed DB data with: poetry run seeder
  • Run migrations with: alembic upgrade head
  • Test the API with: pytest
  • Check code style with: black --check todolist
  • Format code with: black todolist
  • Lint the code with: flake8 todolist tests
  • Run static analysis with: mypy job_form_api tests

PGAdmin

A configured instance of PGAdmin for database monitoring and management is provided by default.

To start it, run: plis start pgadmin

Linting, static check and code style guide

Flake8 is the tool of choice for linting. It is configured to warn about code problems, complexity problems, common bugs and to help developers write better code.

Mypy is the tool of choice for static type checking. This project adopts gradual typing as the metodology for code typing. The rules of Mypy will be updated periodically to ensure that the entire code base is typed and consistent.

Black is the tool of choice for formating and code style guide. Black is an uncompromising formatter for Python code, that is, no code style discussions are necessary, the tool is always correct.

Linter and static type checking rules can be discussed and reviewed with the entire team. Any merge request that tries to change these rules without consent is automatically rejected and closed.

python-fastapi-hex-todo's People

Contributors

garmane 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.