Jorge Cardona

Self.

Twitter Google+ Github

I have two nice ideas for espresso after read this post of Ian Bicking: A Python Web Application Package and Format (we should make one).

First is just a way to declare some system wide needs of a package like libraries or daemonize part of the code. Using entrypoints we can define this “daemons” or libraries to install, I imagine something like this:

entry_points = {'espresso.configuration': {'package.configuration'}}

and in configuration:

from espresso import Configuration

configuration = Configuration({
    'libraries': {
    'libmysqlclient-dev': {
        'debian': 'libmysqlclient15-dev'
        },
'service': {
        'package.service': {
            'type': 'supervisor'
            }
   	    }
}
})

I like the new way of applications in Celery and I think that we can mimic some of its ideas.

The second one is about the “Configuration is outside”, so, basically I’m thinking in espresso as the manager of this “outside”, then an application can ask to it for configurations and more, something like:

from espresso import Configuration

configuration = Configuration({
    'services': ['sql-server', 'redis']
    })

# Espresso will do magic here to ensure the services.
configuration.ask()

Basically we can return some ‘common’ response as url for the services or define a class Service that inform the application how to use it.

Is nothing too much elaborated, but it can be a nice place to start.