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.1.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.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graffiti_lookup_nyc-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8291874f85be7870d743e94d95c410b9f3538d627a86f17d3e63e69520da7d00
MD5 c28cd363d3c71805cfe572f9f2bc8f05
BLAKE2b-256 c7932e743fd759be4afb6851d16cb95e275395813313610303fc2fd9eb782772

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graffiti_lookup_nyc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 132e73afeacc61d63119a143147cdc752fd38c3ab45544192bb1de6f0b8dc4d1
MD5 deaaf7ca3f43af764b31c248d39a8027
BLAKE2b-256 eaa11f1b4babeaf5ee3628a80fc0774ecf7259233e9eefd436267892f57dfaf1

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