Skip to main content

python-lcwc

python-lcwc is a Python library for the LCWC incident feed.

The library features multiple clients for retrieving incidents: a web scraper, an RSS feed parser, and an ArcGIS REST client. See notes below for more information.

Installation

pip install lcwc

Example

import aiohttp
from lcwc.feed import Client

client = Client()

async with aiohttp.ClientSession() as session:
    incidents = await client.get_incidents(session)

    for incident in incidents:
        print(f'{incident.date} - {incident.description}')

Notes

Web Client

The web client uses web-scraping which can be a bit limited for identification purposes but is the most reliable. The web client is the recommended client for use unless you need more granular information such as static identifers.

Feed Client

The feed client uses the RSS feed and is similar to the web client except it overs an (admittedly arbitrary) GUID for each incident. Categorization can be a bit off since the feed doesn't supply that in formation so we have to attempt to extrapolate the category from the incident description/units assigned. Use the web client if you need more accurate categorization.

ArcGIS REST Client

The ArcGIS REST client uses the ArcGIS REST API to retrieve incidents. This is the most accurate client since it uses the same data source as the LCWC website. This is still a bit of a prototype and may be subject to change. The ArcGIS REST client is the recommended client if you need more granular information such as static identifiers and coordinates.

Note that coordinates is None for incidents the service has not geocoded, and that the service does not publish non-emergency EMS activity (ROUTINE TRANSFER, EMS ACTIVITY) at all. See ArcGIS live feed service behavior for the measured details.

Release files for lcwc 0.14.0

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

Source distribution (sdist)

Source distribution for lcwc 0.14.0
File Size Uploaded
lcwc-0.14.0.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lcwc 0.14.0
File Interpreter ABI Platform
lcwc-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.6 kB

Release files / lcwc-0.14.0.tar.gz

Download URL lcwc-0.14.0.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1880644fd74db4c1e444dbf8cbafbc57b5ba23ab9220766d7eadfc59438a7d30
BLAKE2b-256 checksum
How to use checksums
6f53c572892bc1736c435b8e5ac721f1b94c064acd2d15f01faac78e3ea2a0db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / lcwc-0.14.0-py3-none-any.whl

Download URL lcwc-0.14.0-py3-none-any.whl
Size 28.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e0033c86604123d4c497994b3ca5989fdf7abacd0a68d32385c07ebbeb3e188
BLAKE2b-256 checksum
How to use checksums
410eb977639a27609c077d4060b12527ecffe8839c0a13a9422e036d903cd3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release history Release notifications | RSS feed

0.15.0

2 release files

This release

0.14.0 This release

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9.2

2 release files

0.9

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3

2 release files

0.2.1

2 release files

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