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.0.4.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.0.4-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buildmason-0.0.4.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.0.4.tar.gz
Algorithm Hash digest
SHA256 25e6a0e3cee714a47417e3e0751934feaec8b3fec575f2878fc90a8f3daa9a74
MD5 b5c14a6a07fe827cbb1c055fcfa5b7d7
BLAKE2b-256 7072f8ac1c44d83d9b84bc8640fb4576d1a117c7264e8a10409b8ae06831acee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: buildmason-0.0.4-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.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 318e508895e3dd3984f5a12f0163ed3e9181d7083035881a8cfc71aaa9e6c26a
MD5 35900d1d54b946de4dd2a12b3c26a0cc
BLAKE2b-256 3b3ab80efb1e7b6466ef077f4482cb7c8ec5951d1e5169e5b9665472f6398074

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