Beachcoder

Entries from June 2007

Tesla 0.2 changes

June 30, 2007 · 3 Comments

A few things have happened in the Tesla project over the last week:

  • Tesla is now on Cheeseshop ! This means you can install Tesla by doing easy_install (-U) Tesla.
  • Migrations. Yes, Tesla can do Rails-style migrations, thanks to the migrate library for SQLAlchemy. Read more about it here. Migrate commands can now be called from paster and a lot of manual steps are taken care of.

Plus, a bunch of unit tests and minor fixes.

Overall, I’ve tried to keep Tesla as lightweight as possible – adding some Elixir/SQLAlchemy bindings to a basic Pylons framework. The big news in Python this week has been that TurboGears 2.0 is going to be rewritten on top of Pylons, which is a great step forward for both communities and Python in general.

However, TG 2.0 will appeal to those who like the TurboGears way of doing things, while many “core” Pylons developers may prefer a more lightweight framework that stays out of their way but takes care of some lower-level details. That’s pretty much what I’m trying to achieve here. The challenge is to keep Tesla from bloating – so for example I won’t be choosing a particular template engine, widget library etc. That’s up to you.

Some things that are in the pipeline:

  • Integrating Mike Orr’s SAContext, which should provide more configuration options.
  • An AuthKit template based on Tesla, with some default identity classes and helpers.
  • The amazing thing about writing Tesla was how little work was involved – the heavy lifting is done by Paste and Pylons. You just write your glue code and templates and voila – a new framework.

    Now, when will we see Django running on Pylons ?

Categories: Elixir · Paste · SQLAlchemy · Software · Tesla · WSGI

Tesla, a Pylons/Elixir framework

June 22, 2007 · 1 Comment

David Bowie as Nicola Tesla in the Prestige

Tesla is a framework built on top of Pylons and Elixir/SQLAlchemy. It’s being actively developed by myself and Ben Bangert (of Pylons fame). Like Pylons, Tesla is a Paste template, so you just download it, install it and run paster create -t pylons_elixir myapp to get started. A tutorial can be found here.

Pylons and Elixir/SQLAlchemy give you great power and flexibility; however, getting SQLAlchemy and Pylons to work together is a non-trivial task, as the mailing lists and IRC chats will attest. Tesla takes care of that for you by providing the easiest possible setup. It handles unit tests, setup code, and shell integration, and adds some extra commands for creating models and managing your database schema.

There will be more to come. Ben is working on a template based on Tesla with AuthKit integration and basic identity models, and we’ll probably be adding more commands. Integration with the SQLAlchemy migrate library is a likely possibility at some point.

At the moment Tesla is only available on SVN from Google Code. It’s really pre-alpha, so it’s not quite stable yet. Once it’s a bit more tested and stable I’ll probably add it to the Cheeseshop. Any feedback, suggestions and criticism are welcome (please post to the Pylons mailing list or IRC chat).

The name comes from Nicola Tesla, one of the greatest (and most unrecognized) scientists and inventors of the last century.

Categories: Elixir · Paste · Pylons · Python · SQLAlchemy · WSGI