GithubHelp home page GithubHelp logo

yokoberek / fastapi-mvc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from viktorviskov/fastapi-mvc

0.0 0.0 0.0 17 KB

FastAPI MVC this is an example of using FastAPI and built upon the Model-View-Controller (MVC) architectural pattern.

Shell 0.54% Python 91.76% HTML 6.68% Dockerfile 1.02%

fastapi-mvc's Introduction

FastAPI MVC

This template provides a starting point for building web applications using FastAPI and following the Model-View-Controller (MVC) architectural pattern.

Technologies Used

This project is developed using the following technologies:

  • FastAPI: A modern, fast (high-performance), web framework for building APIs with Python 3.7+.
  • Uvicorn: A lightning-fast ASGI server, used to run FastAPI application.
  • PyMySQL: A pure-Python MySQL client library.
  • SQLAlchemy: A SQL toolkit and Object-Relational Mapping (ORM) library for Python.
  • Alembic: A database migration tool for SQLAlchemy.

Project Structure

The project structure is organized as follows:

  • controllers: Contains the controllers responsible for handling requests and business logic.
  • middlewares: Houses various middleware for request handling (e.g., authentication, CORS).
  • models: Stores the application's data models and schemas.
  • repositories: Handles interaction with databases or external services.
  • routers: Defines API routes and separates public/private access endpoints.
  • services: Implements business logic and services.
  • templates: Holds HTML templates for rendering views.
  • utils: Contains utility functions.

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/ViktorViskov/fastapi-mvc.git
  2. Install dependencies:

    cd fastapi_mvc_template
    pip install -r requirements.txt

Running the Application

To start the FastAPI application, use the following command:

cd app
bash dev.bash

Deploying the Project

docker compose up -d

fastapi-mvc's People

Contributors

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