Skip to main content

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

Project description

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/*

If you want to use the alternate config, copy setup-pypi.cfg to setup.cfg before building.

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"
  }
]

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.0.tar.gz (9.7 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.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graffiti_lookup_nyc-1.0.0.tar.gz
  • Upload date:
  • Size: 9.7 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.0.tar.gz
Algorithm Hash digest
SHA256 612f723867c0dd53a5e42b652b5693165601c7d785b3c149553ee141ef149adf
MD5 08aef4f68dd8499dd79033446f292f2d
BLAKE2b-256 af563df01afa3c80624a1cb69d21f47017efd3affdf75694f00f98f47597738a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graffiti_lookup_nyc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fb5af2c98ef47c690febfb477ccbcfe70d308ec633ccd555dff2f631170888c
MD5 aa0ab72957be01c3a3f593d85e450fc8
BLAKE2b-256 f998a345f530cd25af5ab916a2b39643b02933466ced335ab46ea0cc759387c8

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