Metadata-Version: 2.4
Name: pushshift-python
Version: 0.1.1
Summary: Python wrapper for Reddit community analytics via the Pushshift API.
Author: Cason Konzer
License: MIT License
        
        Copyright (c) 2026 Cason Konzer
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/casonk/pushshift_python
Project-URL: Repository, https://github.com/casonk/pushshift_python
Project-URL: Changelog, https://github.com/casonk/pushshift_python/blob/main/CHANGELOG.md
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scikit-learn>=1.2.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: pandas>=1.5.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: networkx>=3.0
Requires-Dist: seaborn>=0.12.0
Requires-Dist: requests>=2.28.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: zstandard>=0.20.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: dyno-lab>=0.3.0; extra == "dev"
Dynamic: license-file

# pushshift_python

A Python wrapper for Reddit community analytics via the [Pushshift API](https://pushshift.io/). Includes data collection, ML classification, and research support.

## Features

- Reddit data collection via Pushshift API
- ML classifiers (Decision Tree, Random Forest, SVM, Logistic Regression)
- Statistical analysis with sklearn, pandas, numpy
- Network analysis with NetworkX
- HPC support (SLURM scripts for Great Lakes cluster)

## Structure

```
pushshift_python.py      # Public facade that re-exports the internal library surface
_pushshift_queries.py    # Shared query base plus file/web collectors
_pushshift_community.py  # Community analytics and feature engineering
_pushshift_modeling.py   # sklearn-based model training and evaluation
_pushshift_api.py        # Reddit OAuth helper for subreddit refreshes
_pushshift_subreddits.py # Subreddit inventory filtering utilities
Great_Lakes_HPC/       # SLURM batch scripts for HPC
Resources/             # Date partition helpers and supporting data
Examples/              # Usage examples
ICWSM/                 # AAAI Web & Social Media research
TADA/                  # Text As Data research
tests/                 # Public API and HPC smoke coverage
```

## Installation

Install the published library in a virtual environment:

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install pushshift-python
```

For development from a checkout:

```bash
pip install -e .
```

The project currently targets Python 3.10+.

For a non-editable local environment, `pip install .` also works.

## Test Data

Available on [Google Drive](https://drive.google.com/drive/folders/13gL5B8e0Onml_j30iT6OVM2kIkOlJvO1).

## Documentation

[Examples/documentation.ipynb](Examples/documentation.ipynb)

## Development

Run the test suite with:

```bash
MPLCONFIGDIR=/tmp/matplotlib pytest -q
```

## License

[MIT](LICENSE)
