Develop your Flask applications - One drop at a time

Today, we're glad to introduce the addition of one more framework to the SourceLair family, Flask. Flask is the continuation of our love for Python web frameworks. From now on, you can select the new Flask project type when you create or clone a new project in SourceLair and you'll be able to play with it within seconds.

What is Flask?

Copying from the official website, Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.

Flask can do a lot of things for a microframework. In SourceLair, we've coded a couple of internal services in Flask - making this our second favorite framework after Django. It gives simplicity and versatility, by defining a very nice routing and request/response handling mechanism, while leaving it up to you to select anything, from which ORM you'll use for your database, to the way your URLs will be constructed.

Why Flask?

Flask has been one of the most wanted frameworks by you, our users, and one that we use a lot internally at SourceLair. This made it our number one choice to be supported in our platform - we hope you'll love the support as much as we do!

Starting your Flask application in no time

To start your Flask application in SourceLair, simple create a new project from the "+" icon of the sidebar, choose Flask and your server will be up and running within seconds

So, can I just clone my application in SourceLair and it'll work?

The simple answer is yes. All you have to do is clone your project and it'll work! There are some things that we can't always do for you automatically though, so you have to make sure the following preconditions exist:

Your application binds to 0.0.0.0

If not, just run your application with: app.run(debug=True, host='0.0.0.0')

Your application is listening to port 5000, which is the default one

If you've changed the default port, you can switch back to the default one by just omitting the port from the run command

your application's server file is called server.py

If you've named it anything else, you can update it from your project’s settings, accessible from the gear icon next to your project's name

you're awesome - we know you are :)

Also, if you need any libraries, you can easily install them using using pip.

Why don't you support all frameworks?

This is an interesting question and while it has nothing to do with Flask, I'd like to shed some light in here. Supporting multiple frameworks in SourceLair is extremely easy, the hard thing is to make them play nicely and provide first class support. That's why we make sure that both of these are true before adding any more frameworks.

If you'd like to see another framework added in SourceLair though, don't hesitate to drop us a line at support@sourcelair.com and we'll be more than happy for it to be the next one we'll add!