Skip to content

ArioA/PyTfL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTfL

A Python library for easy and intuitive maniplulation of TfL's API.


Usage

To get things up and running, you'll need to:

  • Register an app with TfL
    • You'll need to create a product subscription under Products -> <product name>
      • At the time of writing, the only product available is 500 Requests per min
  • Copy PyTfL.conf.template to a PyTfL.conf file, and fill in your app's details
    • TfL's jargon for describing these keys appears to be inconsistent:
      • "Primary key" corresponds to app_id
      • "Secondary key" to app_key
  • Point the app to where this file is located by either:
    • Setting the PYTFL_CONFIG environment variable to your PyTfL.cong's path
    • Being in the same directory as your PyTfL.conf file

Up+coming -

TfL's tube network.

TODO:
  • TubeLines class
    • Basic TubeLines class
    • Integrate TubeStations into TubeLines
    • Integrate TubeRoutes into TubeLines
    • Tidy up the initialisation of these classes in the DAO, Currently takes too long (~30 seconds without caching on TfL's side, ~12 seconds with).
  • TubeNetwork class
    • Rationalise what this is supposed to mean. May need to move much of the functionality found here into a DAO.
    • Create whole network and measure how long this takes. Optimise if necessary.
  • TubeStation class
    • Basic TubeStation class
    • Make use of additionaProperties key - could organised them by the 'category' key.
    • Make use of children key. This can be postponed until other transport types (particularly bus) are incorporated.
    • Entrances (NaptanMetroEntrance)
    • Platforms (NaptanMetroPlatform)
    • Concourses (NaptanMetroAccessArea)
  • TubeRoute class
    • Basic TubeRoute class
  • Other
    • Enums for direction and service_type

Further Information -

  • Government documents on understanding NaPTAN

About

Transport for London's data in Python - fast, simple, intuitive.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages