[](https://travis-ci.org/a-tal/gab)
[](https://coveralls.io/github/a-tal/gab?branch=master)
Based on the popular requests module, this is a minimal Gab.com API client.
There is a `help` method available on all created objects, which can
be used to discover API methods and their call arguments.
The client object is dynamically created during init time. To speed things
up, you can create a Client object with a cached copy of the collections.json
object. Please see the [example.py](example.py) for one such example. To prime
a new cache, save the response of `gab.Client()._get_api_collections()`.
Basic usage example:
```python
>>> import gab
>>> client = gab.Client(gab.Options(
... ...
... ))
>>>
>>> client.help()
Gab.com API Client 0.0.1.
The following collections are known:
creating_posts
engaging_with_other_users
feeds
groups
notifications
popular
reacting_to_posts
user_details
>>>
>>> client.groups.help()
Gab.com API collection Groups.
These are the endpoints to access groups.
The following operations are defined:
group_details
group_moderation_logs
group_users
popular_groups
>>>
>>> client.groups.group_users.help()
Gab.com API collection Groups method Group Users.
Returns a list of given group's members. Requires read scope.
Requires the following path parameters:
group-id
The following headers are defined:
Authorization
Additional optional parameters defined:
before: (example: 0)
>>>
>>> client.groups.group_users(1234)
Traceback (most recent call last):
File "<console>", line 1, in <module>
<snipped>
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: <snip>
>>>
```
Wow! The example ran into an auth error? What the heck?
Yeah, this client library doesn't do auth, never write your own auth.
Instead, use someone else's auth, and pass in a session object.
Please see [example.py](example.py) for a full working CLI example with authentication.
Metadata
Release files for gab 0.0.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 |
|---|---|---|---|---|
| gab-0.0.1.tar.gz | 6.1 kB | Without provenance | Details for gab-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gab-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for gab-0.0.1-py3-none-any.whl |
Total release size: 12.7 kB
Release files / gab-0.0.1.tar.gz
| Download URL | gab-0.0.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
373b26cb35c009da4901ee7cb19127da6f50556d72e36639d8604d67a33aa5ae
|
|
BLAKE2b-256 checksum How to use checksums |
fe180a5bf9666579c5442dd432d14a783e6709f1cd9d44f9c14d835fab1d4326
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Release files / gab-0.0.1-py3-none-any.whl
| Download URL | gab-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
370991d083c5d72dee37b86c28a6e265a0978fca2a8ed6b8bba05012f2548265
|
|
BLAKE2b-256 checksum How to use checksums |
60926d89002a720e5c6ae3b404bf1b9056aebbac972c8fca9342f2b702c93d89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for gab 0.0.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.