Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is paste script?

Tags:

I'm trying to understand what paste script and paster are. The website is far from clear. I used paster to generate pre-made layouts for projects, but I don't get the big picture.

As far as I understand, and from the wikipedia entry, it says it's a framework for web frameworks, but that seems reductive. paster create seems to be able to create pre-made layouts for setuptools/distutils enabled packages.

What is the problem (or set of problems) it's trying to solve?

like image 232
Stefano Borini Avatar asked Nov 26 '09 08:11

Stefano Borini


1 Answers

Paste got several components:

  • Paste Core: various modules to aid in creating wsgi web apps or frameworks (module index). Includes stuff like request and response objects. From the web site: "The future of these pieces is to split them into independent packages, and refactor the internal Paste dependencies to rely instead on WebOb". If you're considering using components from paste core, I suggest you look at the spin-offs instead, like WebOb.
  • Paste Deploy: a system for loading and configuring WSGI applications and servers (module index). Basically some stuff to read a config file and create a WSGI app as specified in the file.
  • Paste Script: A framework for defining commands. It comes with a few commands out of the box, like paster serve (loads and serves a WSGI application defined in a Paste Deploy config file) and paster create (creates directory layout for packages etc). The best intro to paste script I found is http://pythonpaste.org/script/developer.html

Here's the source for the paster serve command: serve.py.

And paster create: create_distro.py.

like image 79
codeape Avatar answered Sep 24 '22 22:09

codeape