Name | pytweetql JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | Easy parsing of Twitter GraphQL API responses |
upload_time | 2024-02-07 18:01:43 |
maintainer | |
docs_url | None |
author | galactixx |
requires_python | >=3.12,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pytweetql
pytweetql is a simple Python package designed for developers who work with the Twitter GraphQL API
Currently it is built to parse tweet, user, and list GET responses from the Twitter GraphQL API. The function to call is based on the GraphQL endpoint. So for the UserTweets endpoint, you would import the ```parsing``` module and use the ```parse_user_tweets()``` function.
## How it Works
```python
from pytweetql import parsing
# Given a response from GraphQL
response = {'data': {.....}}
# To pull data from a tweet response
tweets = parsing.parse_user_tweets(response=response)
# Will return a list of tweet classes, one for each tweet parsed
print(tweets.tweets)
# To pull data from a user response
users = parsing.parse_users_by_screen_name(response=response)
# Will return a list of user classes, one for each user parsed
print(users.users)
# To pull data from a list response
lists = parsing.parse_create_list(response=response)
# Will return a list of list classes, one for each list parsed
print(lists.lists)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "pytweetql",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.12,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "galactixx",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/b7/94/c1b2e2f32eceaa608f03be39a0b4846651f8096131060ad7908eb0caa406/pytweetql-1.0.0.tar.gz",
"platform": null,
"description": "# pytweetql\npytweetql is a simple Python package designed for developers who work with the Twitter GraphQL API\n\nCurrently it is built to parse tweet, user, and list GET responses from the Twitter GraphQL API. The function to call is based on the GraphQL endpoint. So for the UserTweets endpoint, you would import the ```parsing``` module and use the ```parse_user_tweets()``` function.\n\n## How it Works\n\n```python\nfrom pytweetql import parsing\n\n# Given a response from GraphQL\nresponse = {'data': {.....}}\n\n# To pull data from a tweet response\ntweets = parsing.parse_user_tweets(response=response)\n\n# Will return a list of tweet classes, one for each tweet parsed\nprint(tweets.tweets)\n\n\n# To pull data from a user response\nusers = parsing.parse_users_by_screen_name(response=response)\n\n# Will return a list of user classes, one for each user parsed\nprint(users.users)\n\n\n# To pull data from a list response\nlists = parsing.parse_create_list(response=response)\n\n# Will return a list of list classes, one for each list parsed\nprint(lists.lists)\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Easy parsing of Twitter GraphQL API responses",
"version": "1.0.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d7b8efe2bf14b75a8cf19f165af49a28586310e90cf3b0c51d399350f29bba99",
"md5": "7fc4935fb73b356a3cb73a6049624382",
"sha256": "fe8c037748ce8134c261ae927c7b80e00e66f6135a74877f6eb23de0241cf25b"
},
"downloads": -1,
"filename": "pytweetql-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7fc4935fb73b356a3cb73a6049624382",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12,<4.0",
"size": 19521,
"upload_time": "2024-02-07T18:01:42",
"upload_time_iso_8601": "2024-02-07T18:01:42.689096Z",
"url": "https://files.pythonhosted.org/packages/d7/b8/efe2bf14b75a8cf19f165af49a28586310e90cf3b0c51d399350f29bba99/pytweetql-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b794c1b2e2f32eceaa608f03be39a0b4846651f8096131060ad7908eb0caa406",
"md5": "9c2e2ec9a8eb4e09852078b9c3730bed",
"sha256": "5bc3efb2d1020dc03ce0538269754cabdce0c88d6882c312edce5a3ccc65208a"
},
"downloads": -1,
"filename": "pytweetql-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "9c2e2ec9a8eb4e09852078b9c3730bed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12,<4.0",
"size": 12946,
"upload_time": "2024-02-07T18:01:43",
"upload_time_iso_8601": "2024-02-07T18:01:43.740253Z",
"url": "https://files.pythonhosted.org/packages/b7/94/c1b2e2f32eceaa608f03be39a0b4846651f8096131060ad7908eb0caa406/pytweetql-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-07 18:01:43",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pytweetql"
}