Questions tagged [paster]

a set of utilities for web development in Python described as "a framework for web frameworks"

Python Paste

The Python Paste package contains Python modules that help in implementing WSGI middleware.

The package includes a WSGI wrapper for CGI applications. It also includes a simple webserver that can produce WSGI requests.

WSGI Middleware

The WSGI standard is an interface that allows applications to use Python code to handle HTTP requests. A WSGI application is passed a Python representation of an HTTP request by an application, and returns content which will normally eventually be rendered by a web browser. A common use for this is when a web server serves content created by Python code.

There are, however, other uses: WSGI middleware is Python code that receives a WSGI request and then performs logic based upon this request, before passing the request on to a WSGI application or more WSGI middleware. WSGI middleware appears to an application as a server, and to the server as an application. This is analogous to the function of pipes on Unix systems. Functionality provided by WSGI middleware may include authentication, logging, url redirection, creation of sessions, and compression.

Paste helps in developing such WSGI middleware systems. For example, it is used in the Pylons web application framework.

Subcomponents of Paste

Paste has been a long-running open source project, dating from at least 2005. As it has grown, it has unbundled several other utilities from the Paste core. These utilities are part of the Paste project, but form their own packages and have their own version numbers. They include:

WebOb is a wrapper around the WSGI environment. Paste Deploy is a system for finding and configuring WSGI applications and servers. Paste Script, WebTest, ScriptType, INITools, Tempita, WaitForIt, WPHP, WSGIFilter, and WSGIProxy are other notable bundles.

111 questions
2
votes
2 answers

How do I get paster serve to serve both HTTP and HTTPS requests at the same time?

For now I have the following lines in a project configuration on pylons: [server:main] ... ssl_pem = /path-to-pem/file-name.pem so paster serves only HTTPS requests but not HTTP. Any HTTP request causes the following exception in paster debug…
eigenein
  • 2,083
  • 3
  • 25
  • 43
2
votes
3 answers

CKAN paster db init sqlalchemy programming error

I have followed the CKAN install guide from source (http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html) and managed to get all the way until point 6. Create database tables. At that stage, running paster db init -c…
Flashpoint
  • 31
  • 6
2
votes
0 answers

Managing Pyramid configuration files efficiently

Currently I am having production.ini, develop.ini and test.ini for a web application. Most of the INI configuration is copy-paste. I'd like to split off the shared configuration part to base.ini or similar. How Pyramid configuration files can be…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
2
votes
1 answer

How do I include a third-party logger formatter in a PasteDeploy ini file?

I am trying to utilize Pyramid and pyramid_exclog to send exceptions to a third-party system whenever an exception occurs in my web app. Unfortunately, I cannot seem to make my PasteDeploy development.ini to properly recognize the formatter. I've…
Peter Grace
  • 569
  • 5
  • 20
2
votes
1 answer

Composite app route issue

In my Pyramid application, I set up a composite application with my main app on / and my admin portal on /admin. [composite:main] use = egg:paste#urlmap / = mainapp /admin = adminapp [app:mainapp] use = egg:myApp#main [app:adminapp] use =…
Friendly King
  • 2,396
  • 1
  • 23
  • 40
2
votes
1 answer

"IOError: No egg-info directory found" with paster on Plone 4.3.3

The error occurs also when using zopeskel in Plone 4.3.3. This seem to be slightly different from this question. Under Plone 4.3.2 there is no error. $ ../bin/paster create plone_basic Selected and implied templates: PasteScript#basic_package A…
wolfrevo
  • 6,651
  • 2
  • 26
  • 38
2
votes
1 answer

How do I get server stacktrace for paster/waitress application on client side

I'm running a python pyramid application and make restful calls to it. It's a wsgi app and uses waitress as the http server. Currently when I make a failing http request, I get messages like: Internal Server Error The server encountered an…
RoyM
  • 1,118
  • 1
  • 9
  • 28
2
votes
1 answer

Pylons Uploading Distorted Images on Windows

I'm creating an web app in Pylons, and am working on an image upload action. This is currently running using egg:paste#http on my windows machine, in the basic development configuration described in the pylons documentation quickstart. When I POST…
Travis
  • 4,018
  • 4
  • 37
  • 52
2
votes
3 answers

How do I profile `paster serve`'s startup time?

Python's paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I would like it to not fork a thread pool and quit as…
joeforker
  • 40,459
  • 37
  • 151
  • 246
2
votes
0 answers

How to prevent gunicorn access log from getting on to the console and reload properly?

I have a pyramid application and I wanted to serve it using gunicorn instead of the default waitress. But the biggest problem I have is that there is not enough documentation on the subject anywhere. Here is what I would like on my dev machine Use…
Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96
2
votes
1 answer

How to create your own commands in Pyramid 1.4

OK, before 1.4 release we had paster where we can add our own commands, for example for drop cache or load database initial data. Right now, how I understand, pyramid deal with Console Scripts but documentation is poor about this new feature. I want…
Denis
  • 7,127
  • 8
  • 37
  • 58
2
votes
1 answer

Python Paste and auto-restart on non Python source file change

paster serve has --reload option to auto-restart serving wsgi application when any of Python source files or the CONFIG_FILE changes. How to make paster initiate auto-restart also when some other file (not Python source file) changes? UPDATE …
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
2
votes
1 answer

Missing local commands after running zopeskel on windows

I try to create an archetype with zopskel/paster on my newly installed plone 4.2. I have adjusted the buildout.cfg (see below) to get zopeskel.exe and paster.exe generated in the bin folder. Howerver when I run zopeskel as follows (in develop-eggs…
Jardar
  • 19
  • 2
1
vote
1 answer

TurboGears 2.x app-layer config namespacing

Coming from a Django background, I'm accustomed to the framework providing a configuration mechanism which is suitable (and intended) for app-layer configuration rather than framework configuration only. The TurboGears 2.x template includes a…
Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
1
vote
2 answers

Paster vs. ArchGenXML

I questionning myself : is it better to use Paster for creating content types, browser view, portlet, etc... or ArchGenXML ? Which one of those two create the better source code ? Is there an advantage of using one or the other ? Thanks.
Jihaisse
  • 977
  • 5
  • 24