Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Grant Paton-Simpson / Ben Denham: basil - makin...

Grant Paton-Simpson / Ben Denham: basil - making it easy to spin up best practice python web frameworks

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Grant Paton-Simpson / Ben Denham:
basil - making it easy to spin up best practice python web frameworks
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
@ Kiwi PyCon 2014 - Sunday, 14 Sep 2014 - Track 2
http://kiwi.pycon.org/

**Audience level**

Intermediate

**Description**

Python is a great language for web development but spinning up Python web frameworks for development is still not as easy as it could be - especially if following a particular form of best practice e.g. altering the standard folder structure. Basil addresses this pain point. Use cases include students building basic web apps and experienced devs trying out less familiar web frameworks.

**Abstract**

Python is a great language for web development but spinning up Python web frameworks for development is still not as easy as it could be - especially if you're trying to follow a particular form of best practice e.g. altering the standard folder structure, or separating secrets (unversioned) from settings (versioned). And even if you are familiar with one framework, it may not be as easy to spin up another one. The basil project is an attempt to address this pain point. Use cases may include a teaching session where students are learning Python by building a basic web application. Or an experienced developer wanting to try out an alternative web framework. The presentation will look at some of the challenges involved in designing basil.

The talk will cover the following topics:

- standard user experience of setting up a web framework for Python (contrasted with other languages)
- the user experience of basil
- use cases for basil (new developers, experienced developers, teaching)
- existing alternative solutions
- benefits of using vagrant

**YouTube**

https://www.youtube.com/watch?v=ynxQ3qF7LwY

New Zealand Python User Group

September 14, 2014
Tweet

More Decks by New Zealand Python User Group

Other Decks in Programming

Transcript

  1. Lots of moving parts • Python version • Python packages

    • System packages • Database • Web server – If not using built-in server, lots more parts: Apache mod_wsgi, NGINX, Gunicorn, supervisord, etc, etc, etc.
  2. The challenge • Setting up a new project should be:

    – Easy – Fast – Best practice
  3. Basil makes it so: • Install Basil • Pick a

    template • Answer a few simple questions • Start coding • Actually see results on screen!
  4. So how was it? • Basil didn't get in the

    way • Potential for template with batteries included – jQuery – Heroku Basil Flask Blackbox
  5. New developers • Get started in minutes, not hours •

    Reduce the initial learning curve – Write code straight away! • Best practice from day one
  6. Experienced developers • Make learning new frameworks easy • A

    standard way to start new projects – Make your own custom template – Just Vagrant/configuration management • E.g. Puppet, Ansible, Salt, etc. – Share your template with other developers
  7. Students and teachers • Quickly set up 30 machines with

    the same dev environment, even for BYOD situations – Teach programming; not system administration • Students can set up Basil at home • Teachers can customise templates to adjust the starting point for students
  8. Alternatives to Basil • Your own shell scripts – High

    maintenance – Not cross-platform/shareable • Vagrant directly – No solution for simple templating
  9. Goals for Basil • Cross-platform (80% already done) • Simple

    installers • Command line interface • Docker containers instead of VMs • Become a standard platform
  10. Following Basil • Under active development • https:/ /github.com/catalyst/basil •

    Works but some rough edges in packaging and documentation • Let us know how you go • Questions?