Skip to main content

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

  1. Generate a Flask application from scratch
  2. Create controllers, views with simple commands in rails style
  3. Web pages neatly aligned
  4. Cleanup of code using destroy command

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-branch.
  3. Make your changes.
  4. Commit your changes: git commit -m 'Add some feature'.
  5. Push to the branch: git push origin feature-branch.
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_gem-1.2.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

flask_gem-1.2-py3-none-any.whl (18.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page