Skip to main content

Query NYC 311 Graffiti Cleanup Requests via CLI and Python API.

Project description

Graffiti Lookup NYC

This project provides a Python Class and CLI for looking up NYC 311 Graffiti Cleanup Requests.

Setup

pip install -r requirements-dev.txt

It's also useful to install jq to format the JSON output

Usage

Fetch by single SR ID

> python -m graffiti_lookup --id "G2589" | jq .
{
  "address": "40-28 MAIN STREET, QUEENS",
  "service_request": "G2589",
  "created": "10/22/2003",
  "status": "Cleaning crew dispatched.  Property cleaned.",
  "last_updated": "10/22/2003"
}

Fetch by multiple IDs:

> python -m graffiti_lookup --ids "G258700,G258801,G258900" | jq .
[
  {
    "address": "1990 WESTCHESTER AVENUE, BRONX",
    "service_request": "G258700",
    "created": "12/17/2023",
    "status": "Cleaning crew dispatched. No graffiti on property.",
    "last_updated": "1/2/2024"
  },
  {
    "address": "180 ORCHARD STREET, MANHATTAN",
    "service_request": "G258801",
    "created": "12/19/2023",
    "status": "The property owner’s name cannot be determined.",
    "last_updated": "12/20/2023"
  },
  {
    "address": "153 ROEBLING STREET, BROOKLYN",
    "service_request": "G258900",
    "created": "12/21/2023",
    "status": "Cleaning crew dispatched.  Property cleaned.",
    "last_updated": "1/5/2024"
  }
]

PyPI Packaging

Publishing to PyPI

  1. Ensure you have the latest build tools:
pip install -r requirements-dev.txt
  1. Build the package:
python -m build
  1. Upload to PyPI:
twine upload dist/*

Project details


Download files

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

Source Distribution

graffiti_lookup_nyc-1.0.2.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graffiti_lookup_nyc-1.0.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file graffiti_lookup_nyc-1.0.2.tar.gz.

File metadata

  • Download URL: graffiti_lookup_nyc-1.0.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for graffiti_lookup_nyc-1.0.2.tar.gz
Algorithm Hash digest
SHA256 18663656bb322d148f65abf868e1d97181c59da42c5b4765c4c1512a51b02a9b
MD5 5e71b672088acf77d592cdf12b8527d3
BLAKE2b-256 4883c382915b8e7e553a8b4160e543b86d0a45df4daa987d997922550105e716

See more details on using hashes here.

File details

Details for the file graffiti_lookup_nyc-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for graffiti_lookup_nyc-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d073fdb3c5e09f6abc8d11d15d51ea9f050a63277a68f83a62f56dafa1b2f3c9
MD5 a644fa76c0f71516b0838f9fa49e0039
BLAKE2b-256 655f8106ec28f1a1bed51c06975973f426235723252fafcb1e3e310c162089f0

See more details on using hashes here.

Supported by

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