Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.057.465 Times

pyroutes 0.3.0

Company: Kristian Klette
Date Added: September 04, 2013  |  Visits: 288

pyroutes

Report Broken Link
Printer Friendly Version


Product Homepage
Download (33 downloads)



pyroutes is a really small wrapper for rapid development of small Python web applications.<br /><br />Why?<br /><br />I got tired of dealing with the same boring WSGI-stuff everytime I wanted to make a small web-utility in django, but I didn't want to go to far away from it, so I made this little thing to ease the work a bit.<br /><br />How it works<br /><br />The core of the system is WSGI, and a decorator called @route. You simple create add a route decorator in front of the function you want to handle requests to a certain path. pyroutes always tries to use the most specified path-handler available for the request. That means `@route('/foo/bar')` will always be used over `@route('/foo')` given that request path is `/foo/bar` or longer that is. Notice that paths have to be given without a trailing slash.<br /><br />The decorated function should return the helper `Response` class. The `Response` class takes three arguments: `content`, `headers` and `status_code`. `content` is the data that should be returned, `headers` a list of tuples representing the http-headers returned and `status_code` a valid HTTP status code. If `headers` and `status_code` is omitted it defaults to `text/html` as content type and `200 OK` as status code.<br /><br />Example:<br /><br />@route('/')<br />def index(environ, data):<br />return(Response('Hello world!', [('Content-Type', 'text/html')], '200 OK'))<br /><br />Noticed the parameters to the index function? Those are mandatory. The `environ`-parameter is the unmodified environment from WSGI and `data` is a dictionary with the GET and POST parameters.<br /><br />#md5=52e05069e822b04f102e3e801b713019

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Class Content Decorator Function Headers Parameters Pyroutes Request Response Returned Route Small Status Status Code Takes
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


PYROUTES RELATED
Development Tools  -  sigmoid 1.0
Sigmoid creates a Sigmoid function using parameters in PARAMS and the variable range. V = SIGMOID(PARAMS,RANGE) PARAMS: a 3-vector, the entries of which are (in this order): amplitude value phase slope
40.96 KB  
Miscellaneous  -  Extract a inner function from a class 1.1
This function can extract a inner function from a class or a function. It may be useful when writing a unit test code.
 
Development Tools  -  6th order Runge-Kutta ODE 1.0
Function and parameters are predefined in the program which can be changed according to user's requirement.P.S: This code has no new feature compared to existing codes available online. Intention behind posting this very simple code is to help...
10 KB  
Modules  -  1 PixelOut Audio Player CCK Pack 1.0
Insert 1 PixelOut Audio Player in jSeblod CCK content types and managed parameters directly in form of the content type.This pack includes 1 category (1PixelOutPlayer Single) of preset fields that you can use on the box in your content type and 1...
10 KB  
Network & Internet  -  Bricolage 1.10.3
Bricolage, an open-source enterprise-class content management system, greatly simplifies the complex tasks of creating, publishing, and managing the vast libraries of content essential to any organization. With advanced features such as...
2.7 MB  
Programming  -  generateIt 1.0
This is a cocoa objective-C based project for Mac OS X, trying to develop a software to help programmer in early stage of development by creating class diagram and generate headers in specify languages from these diagrams
203.08 KB  
Web Authoring  -  django-debug-toolbar 0.9.1
jango-debug-toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content. Currently, the following panels have been...
143.36 KB  
Portal  -  YaWPS 0.7.1
YaWPS (Yet another Web Portal System) is a hybrid between a content management system and a web portal for medium- or small-sized Internet- or Intranetsites. All system maintenance is done via a webinterface, so no special tools are needed for...
 
Development Tools  -  php-melange 1.0
Features: AAS (Java's Authentication and Authorization Service port) HTTP (Request, Response, Locale & Session servlet-api port) MVC (Struts port) CMS (Extendable CMS)
 
Miscellaneous  -  Associating parameters with a function 1.2
In functional programming, currying is a way to bind arguments with a function and wait for the rest of the arguments to show up later. You "curry in" the first few parameters to a function, giving you a function that takes subsequent parameters...
 
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB