Skip to content

prabhu/pynationalrail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pynationalrail
---------------

pynationalrail is a python implementation of the national rail api. 

Plus it also includes a django based webapp (myrail) to showcase the power of the api. The app uses jqtouch and hence is optimised for modern smartphones.

Dependencies
-------------
For core api
------------
python 2.6.x
Beautiful Soup

For Webapp
----------
Django 1.1.1
jqTouch - Bundled with the app

Installation
-------------

Simply extract the archive in a specific directory and use the setup script.

Usage
------
To use the api, you need to know the three character station code or CRS code. Current list of CRS codes can be found in 
http://www.nationalrail.co.uk/stations/codes/

from nationalrail import nationalrail

rail = nationalrail()
print rail.departures(crs="PAD", filterCrs="STL")
print rail.arrivals(crs="HAY")
print rail.arrivalsAndDeparture(crs="PAD")

Django app
----------

myrail app can be run just like any other django apps.
    
TODO
----
- Webapp requires a number of features.

Contact
-------
Feedbacks to prabhu dot subramanian at gmail.com

About

Python implementation for National Rail api. (UK)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published