Metadata-Version: 2.4
Name: philly
Version: 0.1.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fire[cli]>=0.7.0
Requires-Dist: geojson>=3.2.0
Requires-Dist: geoparquet>=0.0.3
Requires-Dist: gtfs-realtime-bindings>=1.0.0
Requires-Dist: geopandas>=1.1.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: pandas>=2.3.0
Requires-Dist: pydantic>=2.11.3
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: tqdm>=4.67.1
Dynamic: license-file

# Philly

<img src="./assets/logo.png" width="256" alt="logo">

Python Swiff Army knife and CLI for working with [OpenDataPhilly](https://opendataphilly.org/) datasets.

## Examples

```python
from philly import Philly

ps = Philly()

# TODO:
print(ps.list_datasets())
```

### CLI

#### Install

Install globally:

```
uv tool install philly
```

Run directly:

```bash
uvx --from philly phl
```

Help/Usage:

```bash
phl
```

```bash
phl list-datasets
```

Search datasets with fuzzy search ([`fzf` install instructions](https://github.com/junegunn/fzf?tab=readme-ov-file#installation))

```bash
phl list-datasets | fzf
```

```bash
phl list-all-resources | fzf
```

Interactively find and load a resource:

```bash
phl list-datasets \
    | fzf \
    | xargs -I {} bash -c \
    'phl list-resources "{}" --names-only | fzf | xargs -I @ phl load "{}" "@"'
```

## Development

### Update Datasets

```bash
uv run scripts/update_datasets.py
```

### CLI

#### Install CLI

```bash
uv tool install phl --editable
```

## Resources

* OpenDataPhilly
    * https://opendataphilly.org/
    * https://github.com/opendataphilly/
