-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
48 lines (35 loc) · 1.05 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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