Skip to content

About

Python wrapper for Reddit community analytics via the Pushshift API, with ML classification and research tooling.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

402 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pushshift_python

CI License: MIT Python 3.11+

A Python wrapper for Reddit community analytics via the Pushshift API. 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:

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

For development from a checkout:

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.

Documentation

Examples/documentation.ipynb

Development

Run the test suite with:

MPLCONFIGDIR=/tmp/matplotlib pytest -q

License

MIT

About

Python wrapper for Reddit community analytics via the Pushshift API, with ML classification and research tooling.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages