Library for Generating Flask Applications in Rails-like Style
Project description
flask-gem
A Library to generate a Flask app.
Table of Contents
Prerequisites
Before installing, make sure you have the following installed:
- Python 3.x
- pip
Installation
Installing via pip
Install the library using pip
:
pip install flask-gem
Manual Installation
If you prefer, you can manually install the library by cloning the repository:
git clone https://github.com/sushmithapopuri/flask-gem.git
cd flask-generator
pip install .
Usage
App Generation
this command helps to generate a skeleton flask app.
scaffold new <app-name>
Installing requirements and the app is ready
cd <app-name>
pip install -r requirements.txt
Resource Generation
Generating a controller, a model and a view made simple
scaffold generate scaffold posts author:string description:text
For generating a controller/ model alone:
scaffold generate model posts author:string description:text
scaffold generate controller posts author:string description:text
scaffold generate view posts author:string description:text
Starting the App
Migrating the DB, SQLITE here using flask-migrate and the app is ready for demo
flask db init
flask db migrate
flask db upgrade
flask run
Features
- Generate a Flask application from scratch
- Create controllers, views with simple commands in rails style
- Web pages neatly aligned
- Cleanup of code using destroy command
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch: git checkout -b feature-branch.
- Make your changes.
- Commit your changes: git commit -m 'Add some feature'.
- Push to the branch: git push origin feature-branch.
- Open a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any questions, issues, or suggestions, please reach out:
Maintainer: Sushmitha Popuri Email: sushmithapopuri@ymail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.