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 asyncio
import aiohttp
from lcwc.feed import FeedClient


async def main():
    client = FeedClient()

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

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


asyncio.run(main())

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.

Metadata

Release files for lcwc 0.15.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.15.0
File Size Uploaded Provenance Actions
lcwc-0.15.0.tar.gz 23.7 kB Without provenance Details for lcwc-0.15.0.tar.gz

Built distribution (wheel)

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

Total release size: 52.2 kB

Release files / lcwc-0.15.0.tar.gz

Download URL lcwc-0.15.0.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8fa6cc026dd2338b8a2013a11f7d514a3755b2f6310b5c40ca616ee2d56ebb9b
BLAKE2b-256 checksum
How to use checksums
4f2b537a613afa8319067443115df825e6d43d4d4b4c9ad00cb63c0959e40620
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.15.0-py3-none-any.whl

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

Security for lcwc 0.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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