Skip to main content

Train timetable checker (Renfe Cercanias, Spain)

Project description

pyrenfe

What it does.

This script helps you to know when there is a train (Renfe, Spain) next to leave the configured station. Also, you can query the timetable of an specific route.

Nothing more, nothing less… :D

What I need.

To use pyrenfe, you only need:

  • python >= 2.7

  • requests (python module)

  • lxml (python module)

How to install it.

The package is uploaded to PyPI, so you just have to install the package with pip or easy_install.

$ sudo pip install pyrenfe

How to use

To run it, you only need to execute the program with the proper parameters. Here you have some examples:

See the help of the program.

$ pyrenfe --help

Check the next train between Atocha and Principe Pio (when it will leave and when will it arrive).

$ pyrenfe --origin 18000 --destine 10000

Show the same information, but inside a formatted table.

$ pyrenfe -o 18000 -d 10000 -p table

Check the timetable of all the trains between Atocha and Principe Pio for today.

$ pyrenfe --origin 18000 --destine 10000 --timetable

As you can see the origin and the destine are provided with numbers. Those numbers are the IDs of the stations. To take the IDs of your choice you have to fill the official form and then check in the POST which values are provided.

In the future I hope to add this functionality to the script (pull requests are accepted :D).

Author

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrenfe-1.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file pyrenfe-1.0.tar.gz.

File metadata

  • Download URL: pyrenfe-1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyrenfe-1.0.tar.gz
Algorithm Hash digest
SHA256 44111c769781a61ab670daaee1d1e7fef4a361b36ab7f1292853722b9be9bce9
MD5 5626cc0d5e7167292debbeee7b55212e
BLAKE2b-256 deb343ae2bcb3319b70e833ae1d0245f701dcf30e0b761b889a8a14fcd8efc24

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page