Skip to content

PyBici is a Python script that provides valuable information about the Murcia's bike sharing system

Notifications You must be signed in to change notification settings

mgonzalezg9/PyBici

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyBici

PyBici is a Python script that provides the user information about the MuyBici bike sharing system. It shows the nearest stations with bikes where the user can hire one.

Table of Contents

Technologies

Installation

To install the required libraries run pip install -r requirements.txt. Dependency information has been saved using the PIP module pipreqs. This writes only the dependencies the project needs to the requirements.txt file and not all that are installed on the system.

Usage

In order to use PyBici you will need to create a .env file with the following content:

EMAIL_SENDER = YOUR_EMAIL
EMAIL_RECEIVER = YOUR_EMAIL
EMAIL_PASSWORD = YOUR_PASSWORD
EMAIL_STMP_SERVICE = YOUR_SMTP_SERVICE
EMAIL_STMP_PORT = YOUR_SMTP_PORT

Once done this, you can run the script with the following command:

python3 run.py <latitude> <longitude>

You will see an output like the following:

Requesting bike stops within its occupation...
Obtained response. Now calculating the closest stops...

The closest three stops with bikes are:
********************************************************
        Avd de la Libertad: 1 bikes 🚲
        Avd Juan Carlos I: 1 bikes 🚲
        Santo Domingo: 2 bikes 🚲
********************************************************
Have a good ride!

Cron job

In order to receive this mail at a certain hour you can create a cron job with the following command:

crontab -e
m h * * * /usr/bin/python3 ~/PyBici/run.py 37.9909782371875 -1.1318207244033467

This runs the script every day at a certain hour.

About

PyBici is a Python script that provides valuable information about the Murcia's bike sharing system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages