Demo You can see a demo repository, to have an overview of the scaffolded package result: masonite-demo-package
First check the Official Documentation on creating packages ! You can also create a package from the official Github template: starter-package.
- Install the latest
cookiecutter
version:
$ pip install -U cookiecutter
- Generate your Masonite package project following prompt options:
$ cookiecutter https://github.com/MasoniteFramework/cookiecutter-masonite-package.git
(For cookiecutter CLI options, check directly cookiecutter).
Masonite Package Naming Guidelines
To have a consistent Masonite package ecosystem, it is advised to follow Masonite Naming Guidelines.
TL;DR:
- The verbose/human name of your package should start with
Masonite
such asMasonite API
,Masonite Events
,Masonite Nice Package
. - You can slugify this name to get a Python package name (installable with pip). All Masonite packages should have a
Python package name starting with masonite- such as
masonite-api
,masonite-events
,masonite-nice-package
.
When you are first prompted for the name of your package, enter the readable human name without Masonite
:
project_name [Package Name]: My Package
Then the following prompts should not require modifications:
project_slug [my-package]:
project_description [Package description in one line displayed e.g. in README]:
pkg_name [my_package]:
[...]
repository [https://github.com/girardinsamuel/masonite-my-package]: