Skip to main content

A command-line tool for generating scaffolding projects with different configurations

Project description

BuildMason

BuildMason is a command-line tool for generating scaffolding projects with different configurations.

It currently supports creating a basic Flask project, a Flask REST API project, and a Flask project with Blueprints.

Installation

pip install buildmason

Usage

buildmason COMMAND [OPTIONS] [ARGS]...

Commands

  • basic-flask-project: Generates a basic Flask project.
  • rest-api: Generates a Flask REST API project.
  • blueprint: Generates a Flask project with Blueprints.

Options

--help: Show this message and exit.

Getting Started

Basic Flask Project

buildmason basic-flask-project

This command will generate a basic Flask project structure. This is a simple Flask project that creates / route and renders an index.html page. Project template link

Project Structure

{{cookiecutter.project_name}}/
├── README.md
├── app
│   ├── __init__.py
│   └── templates
│       └── home.html
├── config.py
├── requirements.txt
└── run.py

Flask REST API Project

buildmason rest-api

This command will generate a Flask project with REST API configuration. This is a simple Flask project for a REST API with user data. The project defines a user data model and creates/queries the data. Project template link

Project Structure

{{cookiecutter.project_name}}/
├── app/
│   ├── __init__.py
│   ├── models/
│   │   ├── __init__.py
│   │   ├── user.py
│   ├── services/
│   │   ├── __init__.py
│   │   ├── user_service.py
│   ├── utils/
│   │   ├── __init__.py
│   │   ├── config.py
│   ├── app.py
├── tests/
│   ├── __init__.py
│   ├── resources/
│   │   ├── __init__.py
│   │   ├── test_user_resource.py
│   ├── services/
│   │   ├── __init__.py
│   │   ├── test_user_service.py
├── venv/ (virtual environment)
├── requirements.txt

Flask Blueprint Project

buildmason blueprint

This command will generate a Flask project with Blueprints. This is a simple Flask project that allows user login into the web application. We make use several components

  • Flask-Login library for session management
  • built-in Flask utility for hashing passwords
  • Add protected pages to the app for logged in users only
  • Use Flask-SQLAlchemy to create a User model
  • Create sign-up and login forms for the users to create accounts and log in
  • Flash error messages back to users when something goes wrong
  • Use information from the user’s account to display on the profile page

Project template link

Project Structure

{{cookiecutter.project_name}}/
├── app
│   ├── __init__.py
│   ├── models
│   │   ├── __init__.py
│   │   └── user.py
│   ├── routes
│   │   ├── __init__.py
│   │   ├── auth.py
│   │   └── main.py
│   └── templates
│       ├── base.html
│       ├── index.html
│       ├── login.html
│       ├── profile.html
│       └── signup.html
├── requirements.txt
├── run.py
└── tests
    ├── __init__.py
    ├── models
    │   ├── __init__.py
    │   └── test_models.py
    └── routes
        ├── test_auth.py
        └── test_main.py

Contributing

Feel free to contribute to this project. Open issues or submit pull requests on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

buildmason-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

buildmason-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file buildmason-0.1.0.tar.gz.

File metadata

  • Download URL: buildmason-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for buildmason-0.1.0.tar.gz
Algorithm Hash digest
SHA256 052c10e9fff4d27bdddf603a3124f4b23c07a596cf27685d00838e264d581d0e
MD5 1fb119351efc1cce245b660cfba7b0e6
BLAKE2b-256 3bd0e31047889837ef395ee54a54ef4fb4a7c9c29b2d0c458b28cb9c8a195f9f

See more details on using hashes here.

File details

Details for the file buildmason-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: buildmason-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for buildmason-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7534f907c108077edf6dd092a4b2af9181b0eef3aceffd4bb025a86010d87028
MD5 8c32e71b41389925699e48356909c102
BLAKE2b-256 2b508653d50e037ae7241659a703defbd85a37c13a92baa410722611fe5503e3

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