India has the largest railway network. However, because of the low cost (compared to flights), fixed cost (unlike market driven ticket cost of flights), and low cancellation penalty, the railways tickets get booked quickly. Planning a trip by rail is difficult unless seats are available in direct train. There are too many connections, too many trains and too many train routes. Sometimes there are quota from a neighboring station so that if you can't get ticket from your home town you can take the train from the neighboring town, either next or previous. There are several provisions for last minute, last hour and last week ticket purchase at a higher cost. In summary, railway trip planning is very complicated.
The goal of this project is to build an online railway trip planner that periodically downloads the railway train schedule, availability, etc., from existing Indian railways web site, and provides following features:
1. Get availability and cost information for your trip.
2. Allow flexible dates for your trip.
3. Allow constraint driven search, e.g., reach on so-and-so date, or must have AC 2 tier.
4. Be able to save, compare and print itineraries, and integrate with online ticketing system.
5. Show your journey information on a map.
6. Be able to pick the connections and compare multiple options.
Build a web framework in Python that integrates communication and video streaming, and allows you to quickly build web sites that support multimedia and communication. There are several Python based web frameworks such as Django and Pylons. The goal of this project is to emphasize on (1) quick web application development and (2) seamless integration with communication protocols such as XMPP and video streaming such as using Flash. Language: Python
Python is a great application programming language. ActionScript (e.g., in Flash Player) is a great user interface programming language. The goal of this project is to combine the best of both languages. You will create a new framework that will allow (1) a Python program to quickly add a user interface using ActionScript, and (2) an ActionScript software to easily connect and use Python program for additional tasks. One option is to create markup language in Python or XML similar to MXML which allows your to generate various components and scripts in Python and give it to the front end ActionScript software. The front end software takes the markup and creates new ActionScript, Flex and/or Flash components in run-time, and adjusts the user interface. The minor handling of the user input may be done in ActionScript itself, whereas major processing may get delegated to the back-end Python program. Some related work has been described earlier [1, 2] however your project will generalize the idea to build any user interface components. Another advantage of this approach is that it allows you to add additional features that do not exist in Flash Player such as UDP sockets. Language: ActionScript, Python
Python has largely undocumented and some broken support for Digest authentication [1, 2, 3]. Existing web services in Python largely use basic authentication or custom authentication such as using parameters or HTTP cookies [4]. Using basic authentication is not secure, using parameters is not pure RESTful. In this project you will build an authentication mechanism on the server side using Digest authentication and HTTP cookies for a RESTful web service. The tasks are as follows:
Create a web service which handles "GET /login", "GET /view", and "GET /logout" requests. When accessing the 'GET /login' request the server authenticates using Digest authentication. If you use your browser to access this, you will see the password prompt in the browser. After entering the correct username and password, the browser sends another request to your web server with authorization header. Your server verifies the authentication using pre-configured usernames and credentials. If the authentication is successful, then it returns success "200 OK" response, otherwise it again returns the "401 Unauthorized" response. Failure responses should be limited in failed attempts, so that it does not go in infinite loop with automated clients. For success response, the server also sets a cookie containing a session identifier, different from the user's credentials, which the browser can use for subsequent requests such as "GET /view" to the same server. When the user goes to the /logout URL, the server clears the cookies, by expiring it, and removes the session, so that next time the browser will have to authenticate again. You can use the rfc2617.py module of p2p-sip software to learn about Digest authentication in Python.
RESTful architecture has several benefits over traditional RPC-style web services. There are several existing RESTful client and server software for Python with one or more problems: too intrusive, tied to the framework, not WSGI compliant, or allow only one type of applications. The goal of this project is to build Python module(s) that allows a developer to quickly and easily create RESTful services. There are following tasks:
(1) Build a regular expression pattern matching URL "router" to transform a matching request and/or invoke a wsgi compliant application for matching request. The router is a wsgi compliant gateway.
(2) Define a unified data format for representing structured data, which can be easily and unambiguously mapped to both JSON and XML. Python 2.6 has built-in json module. Build a function represent(value, type) which takes the value in this unified data format and type of either 'text/plain', 'text/xml' or 'text/json' and returns a string formatted using that particular representations: plain text, XML or JSON, respectively. The conversion does not have to be bi-directional.
(3) Define a high level decorator, @resource, which transforms resource-type function with methods GET, PUT, DELETE, POST to a wsgi application that can be supplied to the router. This allows the developer to build the RESTful service handler either using low level wsgi application or high level resource-style function.
(4) Define a high level function bind(value), which transforms a Python name "value" to a wsgi compliant resource which can be supplied to the router. The value can be a module, object, class or function, and your software should handle these correctly, e.g., if "GET /value/attr" may return the value of property "attr" of that "value" object, or "POST /value" may create a new object of "value" class and return the new object "id".
(4) Use the wsgiref built-in web server and your software to demonstrate a simple RESTful service, e.g., for accessing file lists on your disk.
Indian railways trip planner
India has the largest railway network. However, because of the low cost (compared to flights), fixed cost (unlike market driven ticket cost of flights), and low cancellation penalty, the railways tickets get booked quickly. Planning a trip by rail is difficult unless seats are available in direct train. There are too many connections, too many trains and too many train routes. Sometimes there are quota from a neighboring station so that if you can't get ticket from your home town you can take the train from the neighboring town, either next or previous. There are several provisions for last minute, last hour and last week ticket purchase at a higher cost. In summary, railway trip planning is very complicated.
The goal of this project is to build an online railway trip planner that periodically downloads the railway train schedule, availability, etc., from existing Indian railways web site, and provides following features:
1. Get availability and cost information for your trip.
2. Allow flexible dates for your trip.
3. Allow constraint driven search, e.g., reach on so-and-so date, or must have AC 2 tier.
4. Be able to save, compare and print itineraries, and integrate with online ticketing system.
5. Show your journey information on a map.
6. Be able to pick the connections and compare multiple options.
Python web communication framework
Build a web framework in Python that integrates communication and video streaming, and allows you to quickly build web sites that support multimedia and communication. There are several Python based web frameworks such as Django and Pylons. The goal of this project is to emphasize on (1) quick web application development and (2) seamless integration with communication protocols such as XMPP and video streaming such as using Flash. Language: Python
Flash GUI for Python Software
Python is a great application programming language. ActionScript (e.g., in Flash Player) is a great user interface programming language. The goal of this project is to combine the best of both languages. You will create a new framework that will allow (1) a Python program to quickly add a user interface using ActionScript, and (2) an ActionScript software to easily connect and use Python program for additional tasks. One option is to create markup language in Python or XML similar to MXML which allows your to generate various components and scripts in Python and give it to the front end ActionScript software. The front end software takes the markup and creates new ActionScript, Flex and/or Flash components in run-time, and adjusts the user interface. The minor handling of the user input may be done in ActionScript itself, whereas major processing may get delegated to the back-end Python program. Some related work has been described earlier [1, 2] however your project will generalize the idea to build any user interface components. Another advantage of this approach is that it allows you to add additional features that do not exist in Flash Player such as UDP sockets. Language: ActionScript, Python
Web authentication in Python
Python has largely undocumented and some broken support for Digest authentication [1, 2, 3]. Existing web services in Python largely use basic authentication or custom authentication such as using parameters or HTTP cookies [4]. Using basic authentication is not secure, using parameters is not pure RESTful. In this project you will build an authentication mechanism on the server side using Digest authentication and HTTP cookies for a RESTful web service. The tasks are as follows:
Create a web service which handles "GET /login", "GET /view", and "GET /logout" requests. When accessing the 'GET /login' request the server authenticates using Digest authentication. If you use your browser to access this, you will see the password prompt in the browser. After entering the correct username and password, the browser sends another request to your web server with authorization header. Your server verifies the authentication using pre-configured usernames and credentials. If the authentication is successful, then it returns success "200 OK" response, otherwise it again returns the "401 Unauthorized" response. Failure responses should be limited in failed attempts, so that it does not go in infinite loop with automated clients. For success response, the server also sets a cookie containing a session identifier, different from the user's credentials, which the browser can use for subsequent requests such as "GET /view" to the same server. When the user goes to the /logout URL, the server clears the cookies, by expiring it, and removes the session, so that next time the browser will have to authenticate again. You can use the rfc2617.py module of p2p-sip software to learn about Digest authentication in Python.
RESTful server tools in Python
RESTful architecture has several benefits over traditional RPC-style web services. There are several existing RESTful client and server software for Python with one or more problems: too intrusive, tied to the framework, not WSGI compliant, or allow only one type of applications. The goal of this project is to build Python module(s) that allows a developer to quickly and easily create RESTful services. There are following tasks:
(1) Build a regular expression pattern matching URL "router" to transform a matching request and/or invoke a wsgi compliant application for matching request. The router is a wsgi compliant gateway.
(2) Define a unified data format for representing structured data, which can be easily and unambiguously mapped to both JSON and XML. Python 2.6 has built-in json module. Build a function represent(value, type) which takes the value in this unified data format and type of either 'text/plain', 'text/xml' or 'text/json' and returns a string formatted using that particular representations: plain text, XML or JSON, respectively. The conversion does not have to be bi-directional.
(3) Define a high level decorator, @resource, which transforms resource-type function with methods GET, PUT, DELETE, POST to a wsgi application that can be supplied to the router. This allows the developer to build the RESTful service handler either using low level wsgi application or high level resource-style function.
(4) Define a high level function bind(value), which transforms a Python name "value" to a wsgi compliant resource which can be supplied to the router. The value can be a module, object, class or function, and your software should handle these correctly, e.g., if "GET /value/attr" may return the value of property "attr" of that "value" object, or "POST /value" may create a new object of "value" class and return the new object "id".
(4) Use the wsgiref built-in web server and your software to demonstrate a simple RESTful service, e.g., for accessing file lists on your disk.
Completed and closed
The project is completed and hosted at http://code.google.com/p/restlite/
Bug fixes and enhancements are welcome!