Modularize your masonite project
Project description
Masonite Modules
Introduction
Modularize your masonite project.
Installation
pip install masonite-modules
Configuration
Add ModuleProvider to your project in config/providers.py
:
# config/providers.py
# ...
from masonite_modules import ModuleProvider
# ...
PROVIDERS = [
# ...
# Third Party Providers
ModuleProvider,
# ...
]
Publish the package resources by doing:
python craft package:publish modules
The default modules location will be modules
in the root directory of your project. But if you want your own custom name then, update the module name in config/modules.py
to your desired module path name.
NAME=modules
Installation
Once you finish publishing package, you need to install the modules by doing:
$ python craft module:install
Finally, you will see the modules directory created in your project root.
Usage
To create the module, simply run:
$ python craft module:create <module_name>
# Example
$ python craft module:create blog
The above command will create a new module called blogs
in the modules
directory. It will also create all the necessary files and directories inside blogs
so you can start working on your module.
Finally, visit /<module_name>
i.e. /blogs
then you will see a welcome message.
Enjoy!
License
masonite_modules is open-sourced software licensed under the MIT license.
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
Built Distribution
File details
Details for the file masonite-modules-0.0.5.tar.gz
.
File metadata
- Download URL: masonite-modules-0.0.5.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fc4f548b26e8e29eae1b046e47f9660dd8574c071709cf68716fc582ab00b7b |
|
MD5 | b9b04412b2fd6e42a1ba263b96b05a5a |
|
BLAKE2b-256 | 81115c5e5946c82cc20d70cfa0c66b1ffce8853eab95e4b4dc975b3059b2b94b |
File details
Details for the file masonite_modules-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: masonite_modules-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bee726324dcc5cd65db71365c3d81eb7d29831d2b7b2f530e91fd3a75ed52e0 |
|
MD5 | ba3504e8f144cc347e6a9af55dac7561 |
|
BLAKE2b-256 | d484eb5e39d55cd946dc49262ce18471400038a4972f29d9a9ef10b237ca4d3a |