Introduction and Installation
Stop using old frameworks with just a few confusing features. Masonite is the developer focused dev tool with all the features you need for the rapid development you deserve. Masonite is perfect for beginners getting their first web app deployed or advanced developers and businesses that need to reach for the full fleet of features available.
Masonite works hard to be fast and easy from install to deployment so developers can go from concept to creation in as quick and efficiently as possible. Use it for your next SaaS! Try it once and you’ll fall in love.
- Mail support for sending emails quickly.
- Queue support to speed your application up by sending jobs to run on a queue or asynchronously.
- Notifications for sending notifications to your users simply and effectively.
- Task scheduling to run your jobs on a schedule (like everyday at midnight) so you can set and forget your tasks.
- Events you can listen for to execute listeners that perform your tasks when certain events happen in your app.
- A BEAUTIFUL Active Record style ORM called Masonite ORM. Amazingness at your fingertips.
- Many more features you need which you can find in the docs!
These, among many other features, are all shipped out of the box and ready to go. Use what you need when you need it.
In order to use Masonite, you’ll need:
- Python 3.7+
- Latest version of OpenSSL
If you are running on a Linux flavor, you’ll need the Python dev package and the libssl package. You can download these packages by running:
Debian and Ubuntu based Linux distributions
$ sudo apt install python3-dev python3-pip libssl-dev build-essential python3-venv
Or you may need to specify your
$ sudo apt-get install python3.7-dev python3-pip libssl-dev build-essential python3-venv
Enterprise Linux based distributions (Fedora, CentOS, RHEL, ...)
# dnf install python-devel openssl-devel
Masonite excels at being simple to install and get going. If you are coming from previous versions of Masonite, the order of some of the installation steps have changed a bit.
Firstly, open a terminal and head to a directory you want to create your application in. You might want to create it in a programming directory for example:
$ cd ~/programming
$ mkdir myapp
$ cd myapp
If you are on windows you can just create a directory and open the directory in the Powershell.
Although this step is technically optional, it is highly recommended. You can create a virtual environment if you don't want to install all of masonite's dependencies on your systems Python. If you use virtual environments then create your virtual environment by running:
$ python -m venv venv
$ source venv/bin/activate
or if you are on Windows:
$ python -m venv venv
First install the Masonite package:
$ pip install masonite
Then start a new project:
$ project start .
This will create a new project in the current directory.
Then install Masonite dependencies:
$ project install
Once installed you can run the development server:
$ python craft serve
Congratulations! You’ve setup your first Masonite project! Keep going to learn more about how to use Masonite to build your applications.