Giter Club home page Giter Club logo

magix-support-lab-management-api's Introduction

File and Folder Structure

/migrations # Migration files
/apis # Routes
    /base.py # Where all the routes are grouped
    /routes # Routes
/config # Main configuration
    /config.py # configurations
/core
    /entity # entity
    /protocol # abstract of repository
    /services # services
/exceptions # Custom exceptions
/infrastructure
    /models # Database table models
    /repository # All database related operations/functions
    /session.py # Database session
    /base_class.py # Base Class for table models
    /base_mixin.py # Base Mixin for timestamp and created by
    /base_repo.py # Base Class for repository with basic CRUD features
    /base.py # Where all table models are grouped
/schemas # Request and response models
/utils # Services
    /hashing.py # Hashing
    /JWTtoken.py # JWTtoken
    /oauth2.py # Oauth2
main.py # App Entry Point
.env.example # Example for ".env"

Development setup

First create a directory then create a virtual environment in it (PLEASE USE VIRTUAL ENVIRONMENT).

python3 -m venv <your-env-name>

To activate your virtual environment go to

On Window :

<your-env-name>\Scripts\activate.bat

On Unix or MacOs :

source <your-env-name>/bin/activate

Finally git clone the repository.

git clone https://github.com/thamardaw/magix-support-lab-management-api.git

Then go into the cloned folder and install requirements (we will be continue working on this directory). While installing setup the ".env" file.

pip install -r requirements.txt

Migrate your models into database.

# to create or update the models to database
alembic upgrade head

Now let's start your server.

uvicorn main:app --reload

Useful commands

if you installed new packages during development, don't forget to update the requirement.

pip freeze > requirements.txt

This command is for auto generating the migration files if you add new models or make changes to your existing model. Then don't forget to mirgrate the changes.

alembic revision --autogenerate -m "init"

magix-support-lab-management-api's People

Contributors

thuaung30 avatar zayminmaw avatar

Watchers

 avatar

Forkers

minbala

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.