Welcome to web.py’s documentation!¶
Contents:
- Accessing User Input
- Accessing the database
- Templating
- Deploying web.py applications
- web.py API
- web.application
- web.db
- web.net
- web.form
- web.http
- web.session
- web.template
- web.utils
CaptureStdoutCounterIterBetterMemoizeProfileStorageThreadedDictautoassign()capturestdoutcommify()cond()counterdateify()datestr()denumify()dictadd()dictfind()dictfindall()dictincr()dictreverse()group()intget()iterbetteriterview()listget()lstrips()memoizenthstr()numify()profilere_subm()requeue()restack()rstrips()safeiter()safestr()safeunicode()safewrite()sendmail()storagestorify()strips()threadeddicttimelimit()to36()tryall()uniq()
- web.webapi
AcceptedBadRequestConflictCreatedForbiddenFoundGoneHTTPErrorInternalError()NoContentNoMethodNotAcceptableNotFound()NotModifiedOKPreconditionFailedRedirectSeeOtherTempRedirectUnauthorizedUnavailableForLegalReasons()UnsupportedMediaTypeacceptedbadrequestconflictcookies()createddata()debug()forbiddenfoundgoneheader()input()internalerror()nocontentnomethodnotacceptablenotfound()notmodifiedokpreconditionfailedredirectseeothersetcookie()tempredirectunauthorizedunavailableforlegalreasons()unsupportedmediatype
Getting Started¶
Building webapps with web.py is easy. To get started, save the following code as say, hello.py and run it with python hello.py. Now point your browser to http://localhost:8080/ which responds you with ‘Hello, world!’. Hey, you’re done with your first program with with web.py - with just 8 lines of code!
import web
urls = ("/.*", "hello")
app = web.application(urls, globals())
class hello:
def GET(self):
return 'Hello, world!'
if __name__ == "__main__":
app.run()