{"id":13593729,"url":"https://github.com/sns-sdks/python-youtube","last_synced_at":"2026-04-10T10:11:32.310Z","repository":{"id":43152504,"uuid":"174317185","full_name":"sns-sdks/python-youtube","owner":"sns-sdks","description":"A simple Python wrapper for YouTube Data API :sparkles: :cake: :sparkles: .","archived":false,"fork":false,"pushed_at":"2025-08-22T08:39:58.000Z","size":1500,"stargazers_count":343,"open_issues_count":14,"forks_count":51,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-22T10:32:54.823Z","etag":null,"topics":["dataclasses","dataclasses-json","python","python-youtube","python3","youtube-api-v3","youtube-data-api-v3","youtube-sdk"],"latest_commit_sha":null,"homepage":"https://sns-sdks.github.io/python-youtube/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sns-sdks.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-07T09:50:57.000Z","updated_at":"2025-08-22T08:39:36.000Z","dependencies_parsed_at":"2023-11-22T10:27:09.744Z","dependency_job_id":"7f8679e0-5946-45c8-9616-486bc0bda8e0","html_url":"https://github.com/sns-sdks/python-youtube","commit_stats":{"total_commits":350,"total_committers":13,"mean_commits":"26.923076923076923","dds":0.06857142857142862,"last_synced_commit":"99d7a2c38840711b2c6e206a5b89fc150543f32b"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/sns-sdks/python-youtube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-youtube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-youtube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-youtube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-youtube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sns-sdks","download_url":"https://codeload.github.com/sns-sdks/python-youtube/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sns-sdks%2Fpython-youtube/sbom","scorecard":{"id":718674,"data":{"date":"2025-08-11","repo":{"name":"github.com/sns-sdks/python-youtube","commit":"ebfa5b9ed8ab549fd4cc59b64becc0f897e429ca"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":5,"reason":"Found 9/17 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/docs.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/docs.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/sns-sdks/python-youtube/test.yaml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/test.yaml:32","Warn: pipCommand not pinned by hash: .github/workflows/test.yaml:61","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T10:33:14.739Z","repository_id":43152504,"created_at":"2025-08-22T10:33:14.739Z","updated_at":"2025-08-22T10:33:14.739Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31637801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataclasses","dataclasses-json","python","python-youtube","python3","youtube-api-v3","youtube-data-api-v3","youtube-sdk"],"created_at":"2024-08-01T16:01:23.753Z","updated_at":"2026-04-10T10:11:32.293Z","avatar_url":"https://github.com/sns-sdks.png","language":"Python","readme":"Python YouTube\n\nA Python wrapper for the YouTube Data API V3.\n\n.. image:: https://github.com/sns-sdks/python-youtube/workflows/Test/badge.svg\n    :target: https://github.com/sns-sdks/python-youtube/actions\n\n.. image:: https://img.shields.io/badge/Docs-passing-brightgreen\n    :target: https://sns-sdks.github.io/python-youtube/\n    :alt: Documentation Status\n\n.. image:: https://codecov.io/gh/sns-sdks/python-youtube/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/sns-sdks/python-youtube\n\n.. image:: https://img.shields.io/pypi/v/python-youtube.svg\n    :target: https://img.shields.io/pypi/v/python-youtube\n\n======\nTHANKS\n======\n\nInspired by `Python-Twitter \u003chttps://github.com/bear/python-twitter\u003e`_.\n\nThanks a lot to Python-Twitter Developers.\n\n============\nIntroduction\n============\n\nThis library provides an easy way to use the YouTube Data API V3.\n\n.. \n\n    We have recently been working on the new structure for the library. `Read docs \u003cdocs/docs/introduce-new-structure.md\u003e`_ to get more detail.\n\n=============\nDocumentation\n=============\n\nYou can view the latest ``python-youtube`` documentation at: https://sns-sdks.github.io/python-youtube/.\n\nAlso view the full ``YouTube DATA API`` docs at: https://developers.google.com/youtube/v3/docs/.\n\n==========\nInstalling\n==========\n\nYou can install this lib from PyPI:\n\n.. code:: shell\n\n    pip install --upgrade python-youtube\n    # ✨🍰✨\n\n=====\nUsing\n=====\n\nThe library covers all resource methods, including ``insert``,``update``, and so on.\n\nWe recommend using the ``pyyoutube.Client`` to operate DATA API. It is more modern and feature rich than ``pyyoutube.Api``.\n\nWork with Client\n----------------\n\nYou can initialize with an api key:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pyyoutube import Client\n    \u003e\u003e\u003e client = Client(api_key=\"your api key\")\n\nTo access additional data that requires authorization, you need to initialize with an access token:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pyyoutube import Client\n    \u003e\u003e\u003e client = Client(access_token='your access token')\n\nYou can read the docs to see how to get an access token.\n\nOr you can ask for user to do OAuth:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pyyoutube import Client\n    \u003e\u003e\u003e client = Client(client_id=\"client key\", client_secret=\"client secret\")\n\n    \u003e\u003e\u003e client.get_authorize_url()\n    ('https://accounts.google.com/o/oauth2/v2/auth?response_type=code\u0026client_id=id\u0026redirect_uri=https%3A%2F%2Flocalhost%2F\u0026scope=scope\u0026state=PyYouTube\u0026access_type=offline\u0026prompt=select_account', 'PyYouTube')\n\n    \u003e\u003e\u003e client.generate_access_token(authorization_response=\"link for response\")\n    AccessToken(access_token='token', expires_in=3599, token_type='Bearer')\n\nNow you can use the instance to get data from YouTube.\n\nGet channel detail:\n\n    \u003e\u003e\u003e cli.channels.list(channel_id=\"UC_x5XG1OV2P6uZZ5FSM9Ttw\")\n    ChannelListResponse(kind='youtube#channelListResponse')\n    \u003e\u003e\u003e cli.channels.list(channel_id=\"UC_x5XG1OV2P6uZZ5FSM9Ttw\", return_json=True)\n    {'kind': 'youtube#channelListResponse',\n     'etag': 'eHSYpB_FqHX8vJiGi_sLCu0jkmE',\n    ...\n    }\n\nSee the `client docs \u003cdocs/docs/usage/work-with-client.md\u003e`_, or `client examples \u003cexamples/clients\u003e`_, for additional usage\n\nWork with API\n----------------\n\n..\n\n    For compatibility with older code, we continue to support the old way.\n\nYou can just initialize with an api key:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pyyoutube import Api\n    \u003e\u003e\u003e api = Api(api_key=\"your api key\")\n\nTo access additional data that requires authorization, you need to initialize with an access token:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pyyoutube import Api\n    \u003e\u003e\u003e api = Api(access_token='your access token')\n\nYou can read the docs to see how to get an access token.\n\nOr you can ask for user to do OAuth flow:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pyyoutube import Api\n    \u003e\u003e\u003e api = Api(client_id=\"client key\", client_secret=\"client secret\")\n    # Get authorization url\n    \u003e\u003e\u003e api.get_authorization_url()\n    ('https://accounts.google.com/o/oauth2/v2/auth?response_type=code\u0026client_id=id\u0026redirect_uri=https%3A%2F%2Flocalhost%2F\u0026scope=scope\u0026state=PyYouTube\u0026access_type=offline\u0026prompt=select_account', 'PyYouTube')\n    # user to do\n    # copy the response url\n    \u003e\u003e\u003e api.generate_access_token(authorization_response=\"link for response\")\n    AccessToken(access_token='token', expires_in=3599, token_type='Bearer')\n\nNow you can use the instance to get data from YouTube.\n\nGet channel detail:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e channel_by_id = api.get_channel_info(channel_id=\"UC_x5XG1OV2P6uZZ5FSM9Ttw\")\n    \u003e\u003e\u003e channel_by_id.items\n    [Channel(kind='youtube#channel', id='UC_x5XG1OV2P6uZZ5FSM9Ttw')]\n    \u003e\u003e\u003e channel_by_id.items[0].to_dict()\n    {'kind': 'youtube#channel',\n     'etag': '\"j6xRRd8dTPVVptg711_CSPADRfg/AW8QEqbNRoIJv9KuzCIg0CG6aJA\"',\n     'id': 'UC_x5XG1OV2P6uZZ5FSM9Ttw',\n     'snippet': {'title': 'Google Developers',\n      'description': 'The Google Developers channel features talks from events, educational series, best practices, tips, and the latest updates across our products and platforms.',\n      'customUrl': 'googlecode',\n      'publishedAt': '2007-08-23T00:34:43.000Z',\n      'thumbnails': {'default': {'url': 'https://yt3.ggpht.com/a/AGF-l78iFtAxyRZcUBzG91kbKMES19z-zGW5KT20_g=s88-c-k-c0xffffffff-no-rj-mo',\n        'width': 88,\n        'height': 88},\n       'medium': {'url': 'https://yt3.ggpht.com/a/AGF-l78iFtAxyRZcUBzG91kbKMES19z-zGW5KT20_g=s240-c-k-c0xffffffff-no-rj-mo',\n        'width': 240,\n        'height': 240},\n       'high': {'url': 'https://yt3.ggpht.com/a/AGF-l78iFtAxyRZcUBzG91kbKMES19z-zGW5KT20_g=s800-c-k-c0xffffffff-no-rj-mo',\n        'width': 800,\n        'height': 800},\n       'standard': None,\n       'maxres': None},\n      'defaultLanguage': None,\n      'localized': {'title': 'Google Developers',\n       'description': 'The Google Developers channel features talks from events, educational series, best practices, tips, and the latest updates across our products and platforms.'},\n      'country': 'US'},\n      ...\n      }\n      # Get json response from youtube\n      \u003e\u003e\u003e api.get_channel_info(channel_id=\"UC_x5XG1OV2P6uZZ5FSM9Ttw\", return_json=True)\n      {'kind': 'youtube#channelListResponse',\n        'etag': '17FOkdjp-_FPTiIJXdawBS4jWtc',\n        ...\n       }\n\nSee the `api docs \u003cdocs/docs/usage/work-with-api.md\u003e`_, or `api examples \u003cexamples/apis\u003e`_, for additional usage.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsns-sdks%2Fpython-youtube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsns-sdks%2Fpython-youtube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsns-sdks%2Fpython-youtube/lists"}