Skip to main content

A CLI tool to generate a Django-like structure for Flask projects

Project description

FlaskMason

FlaskMason is a command-line tool designed to quickly scaffold Flask applications with a Django-like project structure. It automates the creation of a boilerplate project with organized blueprints, configuration files, and other essential components, allowing developers to focus on building features instead of setting up their environment.

Features

  • Django-like Folder Structure: Automatically creates a structured layout for your Flask projects, including blueprints for authentication, admin, and more.
  • Predefined Boilerplate Code: Generates essential files with predefined content, reducing the need for repetitive setup.
  • Easy Installation: Installs all necessary dependencies with a single command.

Installation

You can install FlaskMason via pip. To install it along with its dependencies, run:

pip install flaskmason

Usage

To create a new Flask project, simply run:

flaskmason <project_name>

This command will generate a new directory called <project_name> containing the following structure:

<project_name>/
├── app.py
├── config.py
├── requirements.txt
├── .env
├── blueprints/
│   ├── __init__.py
│   ├── auth/
│   │   ├── __init__.py
│   │   ├── views.py
│   │   ├── models.py
│   │   └── forms.py
│   └── admin/
│       ├── __init__.py
│       ├── views.py
│       ├── models.py
│       └── forms.py
├── static/
└── templates/

Example Commands

  1. Create a new Flask project:

    flaskmason my_flask_project
    
  2. Change directory into the new project:

    cd my_flask_project
    
  3. Run the application:

    python app.py
    

File Descriptions

  • app.py: The main application file where the Flask app is created and configured.
  • config.py: Contains configuration settings for the application, such as database URI and secret keys.
  • blueprints/: Directory for organizing application features into blueprints, improving modularity and maintainability.
  • static/: Directory for static files (CSS, JavaScript, images).
  • templates/: Directory for HTML templates used in rendering views.

Contributing

Contributions are welcome! If you have suggestions or find bugs, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

License

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

Author

Akash Nath

Acknowledgements

  • Thanks to the Flask community for providing an excellent framework for web development.

Notes:

  • Personalize the Author Section: Update the author section with your name and any other relevant details, like your LinkedIn or personal website, if desired.
  • Add More Details: Feel free to expand on any sections, add more examples, or include additional features you plan to implement in the future.
  • Contribution Guidelines: You might want to include more specific contribution guidelines if you expect contributions from others.

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

flaskmason-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

flaskmason-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file flaskmason-0.1.2.tar.gz.

File metadata

  • Download URL: flaskmason-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for flaskmason-0.1.2.tar.gz
Algorithm Hash digest
SHA256 59887d03150d45a5e21e713ba84e37bd54c8d9c14b44636ae56494ac0a4fe84d
MD5 ef25c3f13ae9aa9c294e9887bf4bd16b
BLAKE2b-256 82784325eb7a1bbeebd90f36ae4ed78d3ad7518a2c8e810f3f77250579a0e572

See more details on using hashes here.

File details

Details for the file flaskmason-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: flaskmason-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for flaskmason-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b4bea4a8290a7e33286ee147206f4e06ee97d23ec409a5466eb11ca5d87b2a38
MD5 b3452ec1d0f6c1186a01135d78ab4ff9
BLAKE2b-256 76958fb18ec862f196ac07c7f45d0b76f441ee99bfb2cea3b9b931be9b5f6d55

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