Skip to content

Official Flask Blog tutorial from documentation completely rewritten with Hexagonal Architecture

License

Notifications You must be signed in to change notification settings

ShahriyarR/hexagonal-flask-blog-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexagonal Architecture with Flask and Dependency Injector

FlaskCon 2023 walkthrough

YouTube - Learn Flask the hard way: Introduce Architecture Patterns

This project is a complete-rewritten version of official Flask tutorial using Hexagonal Architecture

Flask Blog tutorial

Flask Blog tutorial code base

About project dependencies

The project has 2 main dependencies:

Dependency Injector

Flask

About Hexagonal Architecture

You can read it from original author:

The Pattern: Ports and Adapters

Current implementation

Layers:

Layers

Hexagonal View:

TBD...

How to install for development?

Use virtualenv as:

python3 -m venv .venv
source .venv/bin/activate

We use flit for the installation:

  • Install flit:
pip install flit==3.8.0
  • Install using make command for development:
make install-dev
  • Init the database
make init-db
  • Start development service:
make run

Other commands

  • Format, sort the imports and also check the style
make format
  • Run linter for final check
make lint
  • Run tests all non-slow and non-integrated tests
make test
  • Run slow tests
make test-slow
  • Run integration tests
make test-integration
  • Run test coverage
make test-cov
  • Run type check
make type-check
  • Run security check
make secure

About

Official Flask Blog tutorial from documentation completely rewritten with Hexagonal Architecture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors