LinkedIn icon Facebook icon Instagram icon YouTube icon TikTok icon Fiverr icon GitHub icon WhatsApp icon Phone icon Contact email icon Book a call calendar icon Play demo icon
Home / Blog / AI & Automation / Parking availability monitor Case study · Python + Twilio

How I built a parking availability monitor that sends SMS alerts

Stop refreshing sold-out booking pages. A practical case study of a Python and Twilio monitor that checks a parking subscription every three minutes and texts when a space opens, and how the same approach works for anything you keep checking by hand.

Published 2026-11-25 · by VIPBizExpert
Notification bell icon representing an SMS availability alertAvailability alertsVIPBizExpert case study

A parking subscription is sold out. There is no waitlist. Your only option is to keep refreshing and hope you catch it. That was the situation for a client in Norway who wanted one specific parking subscription from a parking provider. The booking page said sold out, with no waitlist and no way to be notified when a space opened.

So I built a small monitor. Every three minutes it checks the subscription's availability, and when it changes from sold out to available, it sends an SMS through Twilio to the client's phones. It doesn't book anything. It just makes sure a human hears about the opening without staring at a page all day.

This article walks through how it works, the decisions that made it dependable, and where the same idea fits other businesses. Need an alert system like this? Message me on Fiverr.

In this article

Project at a glance

The short version

Details
ClientA client in Norway (anonymized)
ChallengeA sold-out parking subscription with no waitlist and no availability notifications
SolutionAvailability checks every three minutes, with SMS alerts when a space opens
StackPython (standard library only), Twilio SMS, Docker and Docker Compose
Verified50 automated tests passing, and a real test SMS confirmed on the client's phone
StatusReady for always-on hosting, with a server handoff guide. Not yet moved to a cloud server.

The 50 tests include end-to-end runs against simulated servers. That proves the logic, not every live scenario: a real opening hasn't been caught end to end yet.

Why ordinary scraping didn't work

The obvious first attempt is to download the booking page and look for the words "sold out". It didn't work, because the availability wasn't in the page's initial HTML. The page loaded first, then its JavaScript requested the availability data separately and drew it on screen. A basic HTML download only ever sees the empty shell.

Opening the browser's developer tools and watching the Network tab showed where the page itself got its data: a public, structured data feed listing each subscription and how many were currently available. Reading that feed directly is far simpler and lighter than running a full browser to render the page every few minutes.

One caution matters here. A feed being reachable doesn't automatically make it fair game for any use. The provider's terms, rate limits and any access conditions still apply. This monitor reads a public feed at a modest pace, and it doesn't bypass logins, CAPTCHAs, access controls or anti-bot protection. If a source requires any of that, the honest answer is to find another permitted source or not to build it.

How it works

How the monitor works

Every check follows the same path. A separate path handles checks that fail, so a broken feed never looks like a sold-out subscription.

Every check

Scheduled check (every 3 minutes)
Permitted availability feed
Validate the response
Compare with saved state
SMS decision: alert, reminder or nothing
Save state

When checks keep failing

Check fails (network or format change)
Count failures in a row
Threshold reached: text the owner
Recovered: text the owner again

Availability-change alerts go to the client's phones. The "monitor is broken" and "recovered" texts go to the owner's number.

Step-by-step implementation

Here's the approach in eight steps. The examples are generic; the provider-specific adapter, credentials and deployment are what I build for each client.

Step 1: Define exactly what "available" means

A provider may list several products. The monitor watches one specific subscription, and "available" means its remaining count is one or more. If the watched product disappears from the feed entirely, that's treated as a failed check, not as "sold out", because it may have been renamed or replaced.

Step 2: Find a permitted source of availability data

Use browser developer tools to see what the page itself loads, then confirm the source is public and that checking it at your planned frequency is reasonable. Structured data such as JSON is easier to read reliably than rendered page text.

Step 3: Validate responses, and separate "sold out" from "check failed"

Every response is checked before it's trusted. A timeout, a network error or an unexpected format is a failed check, never "sold out". The parser rejects formats it doesn't recognize instead of guessing, so a feed change can't silently stop alerts.

Step 4: Compare the new result with saved state

Alerts are about changes, not about every check. The monitor remembers the last known availability and only acts when it moves from unavailable to available.

Step 5: Send an SMS, with a limited number of reminders

On a change to available, it texts every configured phone through Twilio's messaging API. While the subscription stays available, it sends a reminder every 10 minutes, up to 6 times by default, then goes quiet. It re-arms when the space disappears and comes back. If no SMS could be sent, it tries again on the next check; if only some numbers failed, those get the next reminder.

Step 6: Save state safely so restarts don't cause an alert storm

State is written to a file after every check, using a temporary file that then replaces the old one in a single step (Python's os.replace). A crash mid-write can't leave a corrupt file, and after a restart the monitor still knows which alerts it already sent.

Step 7: Detect repeated failures and tell the owner

One failed check is normal on the internet. Five in a row (configurable) means something is wrong, so the monitor texts the owner once, then texts again when checks recover. Without this, a monitor can quietly stop working while everyone assumes no news is good news.

Step 8: Package and test it for always-on hosting

The app uses only Python's standard library (HTTP via urllib, JSON, logging), so there's nothing extra to install. It ships as a Docker container managed by Docker Compose, with an automatic restart policy and a health check. It has 50 automated tests: 37 unit tests and 13 end-to-end tests that run the real program against simulated availability and SMS servers.

Reliability matters more than a polling loop

A loop that downloads something every few minutes takes an afternoon. A monitor you can rely on takes more thought. These are the parts that matter:

  • "Unavailable" and "unknown" are different states. A failed request tells you nothing about availability, so it must never be recorded as sold out.
  • Alerts need limits. Deduplication and a capped number of reminders keep the SMS useful instead of noise.
  • Restarts shouldn't forget recent alerts. Persistent state means a reboot doesn't re-send everything. That's practical duplicate protection, not a promise that a duplicate can never happen.
  • A healthy container isn't proof the checks work. Docker's restart policy only restarts a crashed process. The health check here goes further: it reports unhealthy if the state file hasn't been updated for 10 minutes, meaning checks have stopped. Even that can't confirm the provider's data is still correct, which is why repeated failures text the owner.
  • Providers change their systems. If the feed's format changes, the monitor reports failures rather than guessing, and the adapter needs maintenance.
  • Credentials stay out of code and logs. Twilio keys live in a private environment file that's kept out of source control and never copied into the Docker image.
  • SMS has dependencies and costs. Twilio bills per message, and delivery depends on Twilio and the mobile network. Twilio accepting a message isn't the same as the phone receiving it; Twilio tracks message statuses separately. This monitor doesn't track delivery receipts.
  • Polling should be respectful. One small request every three minutes is light. Checking far more often adds load for the provider without much benefit.

How fast is an alert, really?

Checking every three minutes isn't real-time. When a space opens, the monitor normally sees it on its next successful check, so up to about three minutes later, and then the SMS has to travel through Twilio and the mobile network. Network problems or provider delays can stretch that further. Delivery is fast in normal conditions, but it isn't instant or guaranteed.

What's verified

What's been proven, and what hasn't yet

ItemStatus
50 automated tests, including end-to-end runs against simulated serversPassing
Real test SMS sent through TwilioConfirmed on the client's phone
Docker packaging with restart policy and health checkBuilt and configured
Always-on cloud hostingReady, with a handoff guide. Not yet moved to a server.
A real opening caught and alerted end to endNot yet observed

What the client received

  • The Python monitoring application
  • A provider-specific availability adapter
  • Twilio SMS integration, for one or more phones
  • Persistent alert state
  • Failure and recovery notifications to the owner
  • Docker and Docker Compose packaging, with restart policy, health check and log rotation
  • 50 automated tests
  • Setup documentation and a server handoff guide

It's set up to run in Docker on a laptop, which only works while the laptop is on. The handoff guide covers moving it to a small server so it can run around the clock. That move is prepared, not done.

Where else this approach helps

This is availability monitoring: watching whether something you want can be booked or bought. It's different from website uptime monitoring, which checks whether a server is online. The same pattern could be adapted to other things people check by hand, for example:

  • Sold-out appointment slots that occasionally free up
  • Class or course places that open when someone cancels
  • Product restocks
  • Rental availability
  • Limited booking windows that open at unpredictable times
  • Other permitted public data where a change matters to you

These are potential adaptations, not projects I've already delivered. An alert doesn't reserve anything, and I don't build monitors for scalping, queue jumping, auto-purchasing or getting around a provider's rules.

DIY or custom-built?

A basic check is genuinely easy to write. A monitor you can trust needs the rest: reading the data correctly, keeping credentials safe, managing state, controlling alerts, handling errors, testing, and hosting and maintaining it. If you'd rather have that done and documented, that's the service. Related work: Twilio API integration, custom software development and workflow automation.

FAQ

Availability alerts, answered

QCan I get an SMS when a sold-out parking subscription becomes available?
Yes, if the provider's availability can be read from a permitted source. A monitor checks it on a schedule and sends an SMS through a provider such as Twilio when it changes from sold out to available.
QDoes this automatically reserve the parking space?
No. It only alerts you. You still book through the provider yourself, and an alert doesn't hold or reserve anything.
QHow often does it check?
This one checks every three minutes, which is configurable. That means an opening is normally noticed on the next successful check, up to about three minutes later, then the SMS takes its own time to arrive. It isn't real-time.
QCan it monitor a website that loads with JavaScript?
Often, yes. Many JavaScript pages load their data from a structured feed, and reading that permitted source is simpler than rendering the page. Where that isn't possible or permitted, the approach has to change.
QDo I need to keep my laptop on?
Only if it runs on your laptop. For round-the-clock monitoring it should run on an always-on server. This project includes a handoff guide for that move.
QCan it send alerts to more than one phone?
Yes. This monitor texts every number in its list, and can send failure alerts to a separate owner number.
QWhat happens if the provider changes its website?
The monitor treats unexpected responses as failed checks and texts the owner after several in a row, rather than guessing. The adapter then needs updating for the new format.
QCan you build this for another booking or availability use case, and what does it cost?
Yes, where the data can be checked within the provider's rules. Costs come in three parts: the custom development, hosting for an always-on server, and SMS usage billed by your messaging provider. Message me with what you're monitoring and I'll scope it.
Ready?

Still refreshing a page, waiting for something to open?

I build custom monitors that check for changes and send useful alerts, without endless manual checking. Tell me what you're monitoring, how quickly you need to know, and where you want the alert delivered.

Message me on Fiverr →

Prefer the site form? Discuss my monitoring project.