Metadata-Version: 2.1
Name: lcwc
Version: 0.2.1
Summary: Python library for fetching the Lancaster County-Wide Communications live incident list.
Author-email: Nate Shoffner <nate.shoffner@gmail.com>
Project-URL: Homepage, https://github.com/NateShoffner/python-lcwc
Project-URL: Bug Tracker, https://github.com/NateShoffner/python-lcwc/issues
Keywords: lcwc,lancaster,police,fire,ems,dispatch,911,incident
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# python-lcwc

python-lcwc is a Python library for the [LCWC](https://www.lcwc911.us/live-incident-list) incident feed.

Not affiliated or endorsed by LCWC.

The library features both a web scraper and a RSS feed parser. The web scraper client is more reliable due to the RSS feed not categorizing incidents so we have to attempt to extrapolate the category from the incident description/units assigned. Functionally, it should be mostly accurate but edge cases may pop up. Addtionally, the feed parser offers a GUID. This is a unique identifier for each incident. The web client does not offer this.

## Installation

    pip install lcwc

## Example

```python

import aiohttp
from lcwc import webclient

client = webclient.IncidentWebClient()

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

    for incident in incidents:
        print(f'Date: {incident.date}')
        print(f'Description: {incident.description}')
```

## TODO

- [ ] Identify potential duplicate incidents reported under multiple categories (e.g. "Fire" and "Traffic" for vehicle fire)
- [ ] Backing store and event emitter
