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
1
vote
1 answer

How to get "paster request" to use config host value instead of localhost?

I'm trying to access my pylons application via cron job to send notifications to my users. The way I'm doing this is by running the application using something like: paster request myconfig.ini /maintenance/do In the actual controller I check for…
mmartinez
  • 101
  • 5
1
vote
1 answer

Logging configuration for Flask applications run by paster.deploy

The access log and root log for my Flask app was helped by zcbuildout. That's fine. Now I wondered how do I get logging from my own app. I know how to use logging library but paster just do not log it in the console or anywhere. Thanks Here's my…
chfw
  • 4,502
  • 2
  • 29
  • 32
1
vote
1 answer

Why is my log level not being used when using loadapp from paste.deploy?

I want to temporailiy turn on debug messages in a production pyramid web project so I adjusted the production.ini file, pushed it to Heroku and saw only error and warn level messages. So I thought, that seems odd since if I start the pyramid…
kmp
  • 10,535
  • 11
  • 75
  • 125
1
vote
3 answers

paster errors after installing distribute 0.6.10

Been working on a Plone site for the last few weeks, it's the first time I've worked on one using buildout for recipes and paster for template generation, and it's been a learning curve. two days ago, everything was working fine. Yesterday, I…
Paul
  • 35,689
  • 11
  • 93
  • 122
1
vote
1 answer

PasteScript and PasteDeploy not working with Python2.7

We are using PasteScript and PasteDeploy to launch our python service. Things were great until we moved to Python2.7 from Python2.6. PasteScript = 1.7.5, PasteDeploy = 1.5.0 # Launch $ paster serve --reload conf/dev.ini Starting subprocess with…
Vaibhav Desai
  • 2,618
  • 1
  • 16
  • 16
1
vote
1 answer

Pyramid Script using PasteDeploy Pipeline not working

Hello here's my new trouble... i'm using pyramid and i have created a script to fill my db with initial data I have a PasteDeploy configuration file (say development.ini) with this syntax ### # app configuration #…
Michael
  • 792
  • 1
  • 7
  • 14
1
vote
0 answers

AttributeError: 'module' object has no attribute 'NoDefault'

Running paster on Plone UnifiedInstaller 4.2.5 I get the following errors. Any idea on the problem? Traceback (most recent call last): File "../bin/paster", line 382, in import paste.script.command File…
h2o
  • 513
  • 2
  • 8
1
vote
1 answer

Organizing pyramid / paster config files in a modular way

I have a pyramid application using a paster ini file, which is hosted via uwsgi. I want to host different instances (i.e. development, staging, production), ideally without having to touch the config file at all. Obviously different instances need…
Achim
  • 15,415
  • 15
  • 80
  • 144
1
vote
1 answer

How to force rhodecode to invalidate cache after push via ssh

I am running a rhodecode instance for code review etc. however when I push via ssh, the rhodecode does not see the changeset (unless I do a manual pull from hgweb). Do I need a incoming hook in the mercurial or something to get rhodecode to work…
Kimvais
  • 38,306
  • 16
  • 108
  • 142
1
vote
3 answers

How do I access ${buildout:directory} from Python code?

I have a Pyramid web application managed with zc.buildout. In it, I need to read a file on disk, which is located in a sub-directory of buildout directory. The problem is with determining the path to the file - I do not want to hard-code the…
Sergey
  • 11,892
  • 2
  • 41
  • 52
1
vote
2 answers

How would I pass variables to a SQLAlchemy ORM definition at runtime?

I've defined a new Column type called File, which should let me store only the file name in the database. Then I would store the actual file in the file system at root+subfolder+name. File(root, subfolder="", max_length=100, **kwargs) The problem…
GhotiPhud
  • 916
  • 1
  • 13
  • 21
1
vote
1 answer

python: is it possible to detect whether I am in the paster shell?

I'm using Python + ZOPE/ZODB/Repoze BFG (the acronyms all get quite confusing) + paster. I have a paster shell that I can run by doing: paster --plugin repoze.bfg bfgshell site.ini zodb Everything works fine. However, I have a bunch of monitoring…
Claudiu
  • 224,032
  • 165
  • 485
  • 680
1
vote
1 answer

nginx not forwarding upstream

I have a paster server that is set up to host multiple applications with nginx proxying. For some reason, it appears that requests aren't being sent upstream from nginx. I'm getting 404 errors back in the client, and the only "error" I can find in…
Eric Hydrick
  • 3,467
  • 2
  • 28
  • 41
1
vote
2 answers

Deploying Pylons with Nginx reverse proxy?

Is there a tutorial on how to deploy Pylons with Nginx? I've been able to start nginx and then serve pylons to :8080 with paster serve development.ini However, I can't seem to do other stuff as pylons locks me into that serve mode. If I try to…
resopollution
  • 19,600
  • 10
  • 40
  • 49
0
votes
2 answers

Grok DistributionNotFound: grokcore.startup

Used grokproject Sample as in the grok homepage tutorial to simultaneously create a new project and install the grok framework. cd Sample then ran bin/paster serve parts/etc/deploy.ini as in tutorial and came back with a DistributionNotFound:…
citronic
  • 9,868
  • 14
  • 51
  • 74