GateRed
A library to fetch Reddit data using Reddit WebAPI (gateway), w/ pushshift historical submissions support.
Documentation · Replit Playground
Why this library?
Although there are existing libraries (e.g. praw) to interact with Reddit developer's API, there are still several drawbacks when we trying to collect vast amount of data. gatered tries to counter these problems to provide these features:
- No authentication (API key) is needed to access the data.
- Extra attributes is presented using the Reddit webAPI compared to the public devAPI.
- Fully Async based.
- Proxy support via 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_commentsgatered.func.get_posts_with_subreddit_infogatered.func.get_postsgatered.func.get_commentsgatered.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.
Alternately, you can fork the example repo on Replit and play around online.
License
Copyright 2022 CounterTek
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Metadata
Release files for gatered 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gatered-1.3.1.tar.gz | 12.9 kB | Without provenance | Details for gatered-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gatered-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for gatered-1.3.1-py3-none-any.whl |
Total release size: 28.5 kB
Release files / gatered-1.3.1.tar.gz
| Download URL | gatered-1.3.1.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce2080c3e1bfa5de03fd29df006921c86ef3a28bb341e4af2520e50cdc59f523
|
|
BLAKE2b-256 checksum How to use checksums |
2c4d46df1f320b6b1e586931cc08631223c65606996aa0d212992fa6779eb221
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.2 Linux/5.13.0-1021-azure
|
Release files / gatered-1.3.1-py3-none-any.whl
| Download URL | gatered-1.3.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
452e283219362cb02dbeae4c2177f4cb6d2c2f821fe7c68efa4407aec55cec2d
|
|
BLAKE2b-256 checksum How to use checksums |
24208433f0503337e91119069fcff8123360fdee974d0fb126582c1e3f2bf284
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.2 Linux/5.13.0-1021-azure
|
Security for gatered 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.