| Name | SlyYTDAPI JSON |
| Version |
0.4.12
JSON |
| download |
| home_page | None |
| Summary | No-boilerplate, async and typed YouTube Data API access. |
| upload_time | 2024-08-23 18:18:33 |
| maintainer | None |
| docs_url | None |
| author | Dunkyl 🔣🔣 |
| requires_python | >=3.10 |
| license | The MIT License Copyright © 2021 Maroue Reus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
#  Sly YouTube Data API for Python
<!-- elevator begin -->
> 🚧 **This library is an early work in progress! Breaking changes may be frequent.**
> 🐍 For Python 3.10+
<p style="text-align: center;">
No-boilerplate, async, typed access to YouTube Data API 😋
</p>
```shell
pip install slyytdapi
```
This library does not have full coverage.
All methods are read-only.
Currently, the following topics are supported:
* Videos & Playlists
* Channels
* Comment threads
* Video search
* Channel members (requires approval from YouTube)
For collecting statistics about your own channel using the YouTube analytics API, see [YTAAPI](https://github.com/dunkyl/SlyYTAAPI-Python).
<!-- elevator end -->
---
Example usage:
```python
import asyncio
from SlyYTDAPI import *
async def main():
# don't forget to keep your secrets secret!
yt = YouTubeData(open('api_key.txt').read())
my_video = await yt.video('dQw4w9WgXcQ')
print(F"Check this out!\n{my_video.link()}")
# keep it simple
_ = await my_video.comments(limit=10) # list[Comment]
# or opt in to generators
print('\n---\n'.join([
F"{c.author_name} > {c.body}"
async for c in my_video.comments(limit=10)
]))
asyncio.run(main())
```
---
Access to YouTube Data API is free is limited by a quota. See YouTube's [determine quota cost](https://developers.google.com/youtube/v3/determine_quota_cost) article for more information.
If you are using OAuth2 instead of an API Key, a CLI is provided to grant credentials to yourself:
```sh
# WINDOWS
py -m SlyYTDAPI grant
# MacOS or Linux
python3 -m SlyYTDAPI grant
```
Both methods require a Google Cloud Console account and project credentials.
Please see https://docs.dunkyl.net/SlyAPI-Python/tutorial/oauth2.html for more information.
Raw data
{
"_id": null,
"home_page": null,
"name": "SlyYTDAPI",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Dunkyl \ud83d\udd23\ud83d\udd23",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/51/d0/3d58a4d43f616fd5c7b3b5259c3413599fbc42ef5d6a2f7382f25dc84cc3/slyytdapi-0.4.12.tar.gz",
"platform": null,
"description": "#  Sly YouTube Data API for Python\r\n\r\n<!-- elevator begin -->\r\n\r\n> \ud83d\udea7 **This library is an early work in progress! Breaking changes may be frequent.**\r\n\r\n> \ud83d\udc0d For Python 3.10+\r\n\r\n<p style=\"text-align: center;\">\r\n No-boilerplate, async, typed access to YouTube Data API \ud83d\ude0b\r\n</p>\r\n\r\n```shell\r\npip install slyytdapi\r\n```\r\n\r\nThis library does not have full coverage.\r\nAll methods are read-only.\r\nCurrently, the following topics are supported:\r\n\r\n* Videos & Playlists\r\n* Channels\r\n* Comment threads\r\n* Video search\r\n* Channel members (requires approval from YouTube)\r\n\r\nFor collecting statistics about your own channel using the YouTube analytics API, see [YTAAPI](https://github.com/dunkyl/SlyYTAAPI-Python).\r\n\r\n<!-- elevator end -->\r\n\r\n---\r\n\r\nExample usage:\r\n\r\n```python\r\nimport asyncio\r\nfrom SlyYTDAPI import *\r\n\r\nasync def main():\r\n # don't forget to keep your secrets secret!\r\n yt = YouTubeData(open('api_key.txt').read())\r\n\r\n my_video = await yt.video('dQw4w9WgXcQ')\r\n print(F\"Check this out!\\n{my_video.link()}\")\r\n\r\n # keep it simple\r\n _ = await my_video.comments(limit=10) # list[Comment]\r\n\r\n # or opt in to generators\r\n print('\\n---\\n'.join([\r\n F\"{c.author_name} > {c.body}\"\r\n async for c in my_video.comments(limit=10)\r\n ]))\r\n \r\nasyncio.run(main())\r\n```\r\n\r\n---\r\n\r\nAccess to YouTube Data API is free is limited by a quota. See YouTube's [determine quota cost](https://developers.google.com/youtube/v3/determine_quota_cost) article for more information.\r\n\r\nIf you are using OAuth2 instead of an API Key, a CLI is provided to grant credentials to yourself:\r\n\r\n```sh\r\n# WINDOWS\r\npy -m SlyYTDAPI grant\r\n# MacOS or Linux\r\npython3 -m SlyYTDAPI grant\r\n```\r\n\r\nBoth methods require a Google Cloud Console account and project credentials.\r\nPlease see https://docs.dunkyl.net/SlyAPI-Python/tutorial/oauth2.html for more information.\r\n",
"bugtrack_url": null,
"license": "The MIT License Copyright \u00a9 2021 Maroue Reus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "No-boilerplate, async and typed YouTube Data API access.",
"version": "0.4.12",
"project_urls": {
"Bug Tracker": "https://github.com/dunkyl/SlyYTDAPI-Python/issues",
"Documentation": "https://docs.dunkyl.net/SlyYTDAPI-Python/",
"Homepage": "https://docs.dunkyl.net/SlyYTDAPI-Python/",
"Repository": "https://github.com/dunkyl/SlyYTDAPI-Python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "337f4292ac38c11bb99f294f54733bf2f23021d6129ee9554f11a39d7e08d761",
"md5": "e775e722dca8e3bad9c1cf16af5e1192",
"sha256": "b2a84a4d6349e6865fbcf28f74b722445b278c0896d9f773dc6b15e1ce49aa3a"
},
"downloads": -1,
"filename": "SlyYTDAPI-0.4.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e775e722dca8e3bad9c1cf16af5e1192",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 12721,
"upload_time": "2024-08-23T18:18:32",
"upload_time_iso_8601": "2024-08-23T18:18:32.846944Z",
"url": "https://files.pythonhosted.org/packages/33/7f/4292ac38c11bb99f294f54733bf2f23021d6129ee9554f11a39d7e08d761/SlyYTDAPI-0.4.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "51d03d58a4d43f616fd5c7b3b5259c3413599fbc42ef5d6a2f7382f25dc84cc3",
"md5": "8c09e5aab0eff98d7e6b3284e70d9705",
"sha256": "3a092d60a0a46008bbaaba6d87d831beba7023cc9af130a2f4d2ad7e57bd5e00"
},
"downloads": -1,
"filename": "slyytdapi-0.4.12.tar.gz",
"has_sig": false,
"md5_digest": "8c09e5aab0eff98d7e6b3284e70d9705",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 13562,
"upload_time": "2024-08-23T18:18:33",
"upload_time_iso_8601": "2024-08-23T18:18:33.820890Z",
"url": "https://files.pythonhosted.org/packages/51/d0/3d58a4d43f616fd5c7b3b5259c3413599fbc42ef5d6a2f7382f25dc84cc3/slyytdapi-0.4.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-23 18:18:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dunkyl",
"github_project": "SlyYTDAPI-Python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "slyytdapi"
}