Skip to main content
# NYC Parking Ticket Checker

I was interested in writing something to be able to see what tickets I
have outstanding programmatically and saw that
[drassi/nyc-parking-ticket-monitor](https://github.com/drassi/nyc-parking-ticket-monitor)
existed. Unfortunately the end-point used there
(`http://nycserv.nyc.gov/NYCServWeb/NYCSERVMain`) is now behind a
reCAPTCHA challenge making it infeasible to use.

Instead I used the payments end-point
(`http://www1.nyc.gov/assets/finance/jump/pay_parking_camera_violations.html`)
to perform a similar query.

## Libraries

Requires `mechanize` and `BeautifulSoup4` to be installed.

## Installing

`python setup.py install`

Run `ticket_checker`

### Dev dependencies

`pip install twine`

`pip install wheel`

## Usage

```
usage: ticket_checker.py [-h] [--violation VIOLATION] [--plate PLATE]
[--state STATE] [--plate_type PLATE_TYPE] [--debug]

optional arguments:
-h, --help show this help message and exit
--violation VIOLATION
Violation #
--plate PLATE License Plate #
--state STATE 2-letter State of the license plate, defaults to "NY"
--plate_type PLATE_TYPE
3-character type of the license plate, defaults to
"PAS" (passenger)
--debug Turns on debugging of HTTP calls.
```

## Examples

Check for a specfic violation number:

`python ticket_checker.py --violation VIOLATION_NUMBER`

Check for your NY plate:

`python ticket_checker.py --plate COOLPL8`

Check for your Montana plate:

`python ticket_checker.py --plate COOLPL8 --state MT`

Check for your NY commerical plate:

`python ticket_checker.py --plate T0000000 --type COM`

## Example output

If a ticket is found the output will look like:

```
$ python ticket_checker.py --plate COOLPL8
Found 1 ticket(s) for COOLPL8
Got tickets:
1. NO PARKING-STREET CLEANING: violation # 1234567890 for plate COOLPL8 NY PAS on 01/23/2017 for $45.00
```

If there is an error, the script will print the error message returned from the server:

```
$ python ticket_checker.py --plate BADPLATE
"The host system returned the following failure:The plate number was not found. Please verify the plate number, state and type values and search again. Please note if your ticket was recently issued or if you have no outstanding violations, your plate information will not be found. If you wish to pay a ticket you just received, search by the ticket number to ensure it has not been entered into the system. (Error code: PWS-00001) "
```

## Future Plans

- Add support for multiple violations and plates.

## Packaging

`python setup.py sdist`

`python setup.py bdist_wheel`

### Test PyPI

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

### Prod PyPI

twine upload dist/*

## License

[Apache 2.0](https://opensource.org/licenses/Apache-2.0)

Metadata

Release files for nyc-parking-ticket-checker 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nyc-parking-ticket-checker 0.0.6
File Size Uploaded
nyc-parking-ticket-checker-0.0.6.tar.gz 5.1 kB Details

Release files / nyc-parking-ticket-checker-0.0.6.tar.gz

Download URL nyc-parking-ticket-checker-0.0.6.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
11b360a62b31b1050021fcf813bf76f719ebc7331ede5650a9f8203455ae30d1
BLAKE2b-256 checksum
How to use checksums
61a1bf30722150ddd1398ea624dadca57b2874f9504932a9e3b0520c09b6148c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page