Questions tagged [web.py]

web.py is a minimalist web framework for Python.

web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions.

web.py was originally published while Aaron Swartz worked at reddit.com, where the site used it as it grew to become one of the top 1000 sites according to Alexa and served millions of daily page views.

Links

Web.py on Github

Web.py on Google Groups

Tutorials

889 questions
34
votes
10 answers

How do I use python for web development without relying on a framework?

I know the various frameworks have their benefits, but I personally want my web development in python to be as straight-forward as possible: less writing to the framework, more writing python. The only thing I have found so far that lets me do this…
Dantrell B.
27
votes
2 answers

Python equivalent of Sinatra

I know that many people use Sinatra when programming webapps in Ruby because they don't want their framework to get in the way by forcing them to use MVC. Is there something similar in Python? I'm looking for a framework which provides the glue…
Kudu
  • 6,570
  • 8
  • 27
  • 27
22
votes
1 answer

ModuleNotFoundError: No module named 'BaseHTTPServer'

So I am trying to follow a tutorial online on how to work with web.py, and I got it installed but unfortunately, using this piece of code yields a nasty error. My Code... import web urls = ( '/(.*)', 'index' ) app = web.application(urls,…
christopherson
  • 383
  • 3
  • 6
  • 20
22
votes
2 answers

webpy: How to serve JSON

Is it possible to use webpy to serve JSON? I built my website and I need to serve some information in JSON to interact with the Javascript on some pages. I try to look for answers in the documentation, but I'm not able to find…
Giovanni Di Milia
  • 13,480
  • 13
  • 55
  • 67
17
votes
4 answers

Using web.py as non blocking http-server

while learning some basic programming with python, i found web.py. i got stuck with a stupid problem: i wrote a simple console app with a main loop that proccesses items from a queue in seperate threads. my goal is to use web.py to add items to my…
Titusz
  • 1,435
  • 1
  • 22
  • 30
17
votes
4 answers

No module named utils error on compiling py file

I'm trying to run a .py file through the command prompt using the command "python filename.py". I've already set the environment variables for python after I installed it, so I don't get any error when I type python. The file I'm running imports a…
Andrew Brick
  • 276
  • 2
  • 4
  • 18
16
votes
1 answer

Webpy: how to set http status code to 300

Maybe it is a stupid question but I cannot figure out how to a http status code in webpy. In the documentation I can see a list of types for the main status codes, but is there a generic function to set the status code? I'm trying to implement an…
Giovanni Di Milia
  • 13,480
  • 13
  • 55
  • 67
16
votes
4 answers

web.py - specify address and port

How to specify listening address and port in web.py? Something like: web.application( urls, host="33.44.55.66", port=8080 ) Edit I would like to avoid using the default web.py command line parsing
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
14
votes
2 answers

Google analytics illegal cookie breaks Python backend

In my feed that is published to feedburner I have Russian characters in campaign name in tracking settings Feed: ${feedUri} ${feedName}. The problem is that it results as incorrect __utmz cookie set by Google Analytics, and cannot be processed by my…
Andrey Kuzmin
  • 4,479
  • 2
  • 23
  • 28
14
votes
4 answers

Django or web.py, which is better to build a large website with Python?

I'd like to use Python to build a website with more than 100,000 PV each day. Now what I concern is to choose which web framework. I know lots of people use Django, and some people use web.py. Django seems powerful, and I also like the simplicity of…
flypen
  • 2,515
  • 4
  • 34
  • 51
13
votes
2 answers

Rendering HTML in web.py

I am handling with a Wikipedia-like project. I can convert the text file to html code using the markdown. My problem is, I want to render this html code in a html file. Here is my code, class articles: def GET(self): …
Ajay Soman
  • 1,631
  • 4
  • 19
  • 37
13
votes
3 answers

call function with a dynamic list of arguments in python

I need to call a function that handles a list of arguments that can have default values: example code: web.input(name=None, age=None, desc=None, alert=None, country=None, lang=None) How can I call web.input like this using a list or dictionary? I'm…
Casper Deseyne
  • 331
  • 1
  • 3
  • 11
11
votes
4 answers

web.py development server - favicon.ico - 404 Not Found

When running a web.py application with the development server, how do you get rid of the 404 error for the favicon? "HTTP/1.1 GET /" - 200 OK "HTTP/1.1 GET /favicon.ico" - 404 Not Found Everything I've been able to find about eliminating this error…
tponthieux
  • 1,502
  • 5
  • 18
  • 30
10
votes
3 answers

Differences between webapp and web.py

Webpy.org - Who uses web.py? "[web.py inspired the] web framework we use at FriendFeed [and] the webapp framework that ships with App Engine..." — Brett Taylor, co-founder of FriendFeed and original tech lead on Google App…
abel
  • 2,377
  • 9
  • 39
  • 62
10
votes
1 answer

web.py: how to get POST parameter and GET parameter?

I'm new to web.py. I used PHP alot. In PHP, POST parameter and GET parameter is stored in different global variables For example: curl http://127.0.0.1/test?get_param1=1 -d 'post_param1=2' In PHP you can get $_GET['get_param1'] is 1 and…
yegle
  • 5,795
  • 6
  • 39
  • 61
1
2 3
59 60