Git Product home page Git Product logo

mvc4kivy's Introduction

mvc4kivy (m4k)

Borrowed from the kivymd's MVC tool project creator but with some features added like lazy loading of kv file and lazy adding of screen to improve application speed at startup.

To install run

pip install mvc4kivy

To create a project

### Template command:
m4k-createproject name_pattern path_to_project name_project python_version kivy_version

# Example command:
m4k-createprojectt MVC /home/kengoon/PycharmProjects MyMVCProject python3.10 2.1.0

This command will by default create a project with an MVC pattern. Also, the project will create a virtual environment with Python 3.10, Kivy version 2.1.0 and KivyMD master version.

Creating a project using a database

# Template command:
m4k-createproject \
    name_pattern \
    path_to_project \
    name_project \
    python_version \
    kivy_version \
    --name_database
    
# Example command:
m4k-createproject \
    MVC \
    /home/kengo/PycharmProjects \
    MyMVCProject \
    python3.10 \
    2.1.0 \
    --name_database firebase

This command will create a project with an MVC template by default. The project will also create a virtual environment with Python 3.10, Kivy version 2.1.0, KivyMD master version and a wrapper for working with the database restdb.io.

Create project with responsive view

When creating a project, you can specify which views should use responsive behavior. To do this, specify the name of the view/views in the โ€“-use_responsive argument:

# Template command:
m4k-createproject \
    name_pattern \
    path_to_project \
    name_project \
    python_version \
    kivy_version \
    --name_screen FirstScreen SecondScreen ThirdScreen \
    --use_responsive FirstScreen SecondScreen

To add a view

The script creates a new View package in an existing project with an MVC template created using the create_project utility.

Use a clean architecture for your applications.

To add a new view to an existing project that was created using the create_project utility, use the following command:

# Template Command:
m4k-addview \
    name_pattern \
    path_to_project \
    name_view
    
# Example Command
m4k-addview \
    MVC \
    /home/kengo/PycharmProjects \
    NewScreen

You can also add new views with responsive behavior to an existing project:

m4k-addview \
    MVC \
    /home/kengoon/PycharmProjects \
    NewScreen \
    --use_responsive yes

To remove a view

# Template Command:
m4k-rmview \
    name_pattern \
    path_to_project \
    name_view
    
# Example Command
m4k-rmview \
    MVC \
    /home/kengo/PycharmProjects \
    NewScreen

mvc4kivy's People

Contributors

kengoon avatar

Stargazers

 avatar

Watchers

 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.