The Artima Developer Community
Sponsored Link

Python Buzz Forum
Paste 1.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ian Bicking

Posts: 900
Nickname: ianb
Registered: Apr, 2003

Ian Bicking is a freelance programmer
Paste 1.0 Posted: Dec 18, 2006 9:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ian Bicking.
Original Post: Paste 1.0
Feed Title: Ian Bicking
Feed URL: http://www.ianbicking.org/feeds/atom.xml
Feed Description: Thoughts on Python and Programming.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ian Bicking
Latest Posts From Ian Bicking

Advertisement

I am happy to announce the release of Paste 1.0. This release includes all the major components: Paste (core), Paste Script, Paste Deploy, and Paste WebKit.

In all honesty Paste passed the 0.x stage a long time ago. But now it's official: Paste is really stable. How stable? A lot stable. APIs won't be shifting without due warning, and only if there's a good reason. The scope of Paste is also going to be more constrained -- new work should happen outside of Paste. I've already started this a while ago, making most new projects of mine independent packages. This is fine for Paste, because Paste does not encourage integration, and a module under the paste namespace has no special abilities or privilege.

Of course, some work will continue in Paste, but the focus will be on expanding and polishing what's already there, while larger work may take the form of extracting pieces from Paste (this may very well happen for paste.exceptions, paste.evalexception and paste.auth)

I realize I haven't tried to explain What Paste Is for a long time. It used to be a hobby of mine to misexplain it. Maybe it's time to try again.

What Is Paste?

Three entirely different things. Maybe more. These form some sort of unified strategy in my mind -- though only an incomplete strategy -- but there's no reason you should even worry about that.

Paste core

This is the main Paste package. This is a bunch of WSGI components. It does all sorts of nice little things. There's an HTTP server in there. There's an HTTP proxying setup. There's a exception catcher. There's something like Apache's ErrorDocument. There's a system for doing internal subrequests. There's some URL parsing. There's static file serving. There are a variety of debugging tools. There's several library routines to handle particular situations in WSGI, like parsing form variables, reading headers, generating error responses, etc.

You can use all of these, though that's unlikely. You can use several. You can use just one. Not much buy-in is really required.

Several of these pieces are kind of low-level. Often a higher-level framework like Pylons or CleverHarold will wrap these pieces up in a more tasty and cohesive package. Some actually are more deployment-related, like the prefix-based routing in paste.urlmap, and so you might use them directly.

You can even write your own web framework with Paste. It's really quite easy, you should totally give it a try.

Paste Deploy

Paste Deploy is a concept, and an implementation.

The concept is that you can represent pieces of a WSGI stack with some simple functions. Each part is pretty simple: paste.app_factory is a factory that builds WSGI applications. paste.filter_app_factory is a factory that wraps applications with middleware. paste.server_runner is a function that runs a server with your application. Each kind of function has a particular kind of signature, and if you can wrap your app/middleware/server in that kind of function then other people can handle it in a consistent way.

The implementation is a system that builds a stack of apps, middleware, and a server using an INI-style configuration file.

Paste Script

Paste Script is some command-line glue, and some bits and pieces.

As command-line glue, it lets you do things like load a config file (with Paste Deploy), then actually run it. And little things like change the user ID, daemonize, etc.

It also has stuff to build the file layout for new projects.

It also has some stuff to do application deployment.

Conclusion

So that's Paste. If you think you Don't Really Get It, it's probably because you think there's more to it than there is.

Read: Paste 1.0

Topic: Bangalore Python Conference Previous Topic   Next Topic Topic: WSGI and paste.proxy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use