Skip to main content

Reddit Gateway API Library

Project description

GateRed

A utils for interacting with Reddit Gateway API (Web API), w/ pushshift historical posts support.

Latest Version Supported Python Versions CI Code style: black GitHub license

Documentation

Why this library?

Although Reddit has developer APIs and there are existing libraries (e.g. praw) to interact with reddit, there are still several drawbacks in terms of collecting data:

  • An API key is needed to collect data.
  • Rate limit is based on API keys.
  • Some fields are missing using developer APIs.

Therefore, gatered exists just to counter this problem. It directly access Reddit's web API to get the whole information. No authentication is needed, and it supports proxy provided by httpx.

Install

You can install this library easily from pypi:

# with pip
pip install gatered

# with poetry
poetry add gatered

Using

The library provides easy functions to get start fast:

  • gatered.func.get_post_comments
  • gatered.func.get_posts
  • gatered.func.get_comments
  • gatered.func.get_pushshift_posts

Alternatively you can directly use gatered.client.Client and gatered.pushshift.PushShiftAPI classes as your base to implement your own logics.

Errors can be handled by importing either gatered.RequestError or gatered.HTTPStatusError, see httpx exceptions to learn more.

See examples/ for more examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gatered-1.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

gatered-1.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file gatered-1.1.0.tar.gz.

File metadata

  • Download URL: gatered-1.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.2 Linux/5.11.0-1028-azure

File hashes

Hashes for gatered-1.1.0.tar.gz
Algorithm Hash digest
SHA256 44fe148e2f981aeaa8508f34e09670af98e2880707883000cfbfc8a5e6ee4f42
MD5 08c2b1f7053e4a23a544a18343b11204
BLAKE2b-256 bdda2ca585e5a9bf8c6421d5b93939e9e8b30874fc71613d8154cc4b40712e23

See more details on using hashes here.

File details

Details for the file gatered-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gatered-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.2 Linux/5.11.0-1028-azure

File hashes

Hashes for gatered-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f9f2321d9fb9fecdaf256ce48051f1aa053c2ab843ed2e2d3af53b88f7f404
MD5 5308cbee2580b57486052af156f23430
BLAKE2b-256 e44a04ee9ca986bf69b1e6e2a8fd2a220d55def413de6946aedcf6abe04f0b23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page