This project makes it easy to view parking garage space availability on the University of Central Florida's main campus. This project contains a web scraper and REST API written in Python and a website written in Next.js with Tailwind CSS. This project aims to relieve the stress of finding a parking spot on campus and assist students with creating a plan before arriving on site.
- 🚀 Hourly parking data scraped since March 21st, 2021!
- 🖥️ Public API with access to a bunch of methods. Learn more!
- 📦 Out of the box included dashboard with various customizable sorting and viewing options.
- 📱 Mobile support.
- 🔥 Linting support with pre-commit hooks.
Please note that these routes are for ucfparking.com. Please note that each of these routes returns a page of JSON. The timezone in this project is UTC. Queries with an asterik (*) next to the description may take a bit of time depending on the amount of data in the database.
Before running, there are a few environment variables to setup in this project, used for security reasons:
DB_HOST
- your database's host addressDB_USER
- your database's user nameDB_PASS
- your database's user passwordDB_NAME
- your database's nameDB_PORT
- your database's port . . . usually 3306!SENTRY_URL
- very helpful debugging tool
With this current project setup, a MySQL database is required to store the data. We use a plan provided by ClearDB MySQL on Heroku.
Dependencies need to be installed on your environment by running:
pip install -r requirements.txt
Once you've set that all up, you can begin to start scraping data and setup your own API!
To run the web scraping script, run the following command inside the project:
python api/deploy/main.py
To run the API locally, run the following command inside the project:
uvicorn api.api:app --reload --port 5000
Then open localhost to see your application running.
The API, data scraper, and database currently run on a dyno on Heroku. The Next.js site is deployed on Vercel.
This project uses Advanced Python Scheduler to run the data scrapper every sharp hour (:00).
The Heroku add-on's that are used include: ClearDB MySQL and New Relic's APM.
To get the API to work, take a look at the Procfile and how we use Uvicorn to run it.