Skip to main content

A simple tool to help you setup a flask project quickly

Project description

Flask-Setup

Flask-Setup is an open-source and user-friendly tool designed to help you set up a Flask project in under 10 minutes. With a single fs command, it takes care of all your CRUD operations (HTTP methods) such as post, get, put, and delete automatically.

Imagine skipping the tedious setup process and diving straight into building your application's features. Flask-Setup does the heavy lifting, so you can focus on what truly matters rather than setting up boilerplate code.

Explore more and see how Flask-Setup can streamline your Flask development at the Flask-Setup PyPI page.

Getting Started

If you have any questions that are beyond the scope of the documentation, Please feel free to email us.

Installation

Make sure Python is installed on your system (Windows, Linux, macOS). Then, run the following command:

pip install flask-setup

Upgrade

To upgrade Flask-Setup to the latest version, run the following command:

 pip install --upgrade flask-setup

Usage

To use Flask-Setup, run the fs command followed by the desired argument (fs command argument) in the terminal. Here are the available commands:

  • build
  • init
  • add
  • remove
  • install
  • uninstall
  • start

The arguments can be a project name, blueprint name, and/or field names with their respective data types.

Commands

build

This creates a new project with the specified name.

fs build projectname

init

This initialises a .fs file in the root directory of an existing Flask project, enabling seamless use of Flask-Setup fs commands.

fs init

migrate

This migrates older version of a flask-setup project (v0.6.1 and below) to the latest version.

fs migrate

add

This command adds a blueprint with the name 'api' and the specified model fields.

fs add api ..fields
  • Supported field types include str (optional), int, float, bool, date, fk, rel.
  • Example usage:
    • fs add category name:str news:rel=news
    • fs add news title:str date:date body views:int category_id:fk=category.id

In the first example, a blueprint named 'category' will be created with the a str field 'name' and a relationship with the model 'news'.

In the second example, a blueprint named 'news' will be created with the specified model fields. Note that the str field type for body is optional and has been omitted.

remove

This will remove the blueprint named 'api' from the project.

fs remove api

install

This will install the specified module "flask" and freeze it to the requirements file.

fs install flask

uninstall

This will uninstall the specified module "flask" and remove it from the freeze requirements file.

fs uninstall flask

start

This will start the server.

fs start

Model Changes

[!Note] To create database tables or apply model changes, perform the following database migration and upgrade steps:

flask db migrate -m "migration message"
flask db upgrade

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_setup-0.7.8.1-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file flask_setup-0.7.8.1-py3-none-any.whl.

File metadata

  • Download URL: flask_setup-0.7.8.1-py3-none-any.whl
  • Upload date:
  • Size: 41.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.2

File hashes

Hashes for flask_setup-0.7.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9992cbac4d5998e480f025e49ae8caf4405d3da898151fbef675eb35a74ec524
MD5 34e911e31788946017826019c3512b16
BLAKE2b-256 21ad105a5bdd719dfc5aaf698371776761e94e63d4cceca48c23b8f65d8f6ff8

See more details on using hashes here.

Supported by

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