If you are familiar with PHP and Laravel and would like to learn Python, it is good to know that there is a Python web framework out there that is very similar to Laravel: Masonite.
Masonite is a Python MVC web framework which is very close to Laravel. So in a few hours you will be able to develop your own Python web application :-)
Here is the documentation and the starting instructions: https://docs.masoniteproject.com/
There are also some getting started videos: https://masonitecasts.com/timeline/getting-started/introduction
Here are some examples of Python Masonite.
Routing
ROUTES = [
Get('/contacts', 'ContactsController@index').name('contacts.index'),
Post('/contacts', 'ContactsController@store').name('contacts.store'),
]
Controller
def index(self, view: View, request: Request):
contacts = Contact.all()
return view.render('contacts.index', {'contacts': contacts})
Migrations
def up(self):
with self.schema.create('Contacts') as table:
table.increments('id')
table.string('last_name')
table.string('first_name')
table.timestamps()
As you can see your Laravel knowledge will be very useful :-)
If you have any questions do not hesitate.
For those who like the concept and want to encourage the developer please don’t hesitate to give a little star for Masonite on Github: https://github.com/MasoniteFramework/masonite
Good development!
Oldest comments (2)
Wow! It really has a very similar concept. Even ORM!
Are you a maintainer? Have you an experience for use it in production?
I'm interesting - what about performance in comparison to the original Laravel and Django? As a fact, Laravel is a heavy PHP framework.
I saw github.com/the-benchmarker/web-fra... the results of the Masonite looks better than many other - flask, django, laravel... But benchmark case is far from a real application