Skip to main content

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.

Metadata

Release files for buildmason 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buildmason 0.1.0
File Size Uploaded Provenance Actions
buildmason-0.1.0.tar.gz 3.8 kB Without provenance Details for buildmason-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for buildmason 0.1.0
File Interpreter ABI Platform Actions
buildmason-0.1.0-py3-none-any.whl Python 3 none any Details for buildmason-0.1.0-py3-none-any.whl

Total release size: 8.3 kB

Release files / buildmason-0.1.0.tar.gz

Download URL buildmason-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
052c10e9fff4d27bdddf603a3124f4b23c07a596cf27685d00838e264d581d0e
BLAKE2b-256 checksum
How to use checksums
3bd0e31047889837ef395ee54a54ef4fb4a7c9c29b2d0c458b28cb9c8a195f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / buildmason-0.1.0-py3-none-any.whl

Download URL buildmason-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7534f907c108077edf6dd092a4b2af9181b0eef3aceffd4bb025a86010d87028
BLAKE2b-256 checksum
How to use checksums
2b508653d50e037ae7241659a703defbd85a37c13a92baa410722611fe5503e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for buildmason 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page