{"id":48503675,"url":"https://github.com/henribru/google-api-python-client-stubs","last_synced_at":"2026-04-07T15:36:25.314Z","repository":{"id":40654234,"uuid":"300967074","full_name":"henribru/google-api-python-client-stubs","owner":"henribru","description":"Type stubs for google-api-python-client","archived":false,"fork":false,"pushed_at":"2026-03-29T02:33:58.000Z","size":20969,"stargazers_count":64,"open_issues_count":4,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T05:27:02.382Z","etag":null,"topics":["annotations","google-api-python-client","googleapiclient","mypy","pep561","pylance","pyre","pyright","python","pytype","stubs","stubs-only","type-annotations","type-stubs","typed","typing"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/google-api-python-client-stubs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henribru.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-03T19:55:17.000Z","updated_at":"2026-03-11T18:21:04.000Z","dependencies_parsed_at":"2024-03-16T19:11:42.723Z","dependency_job_id":"1ea127af-6e6d-466b-88ac-e528f47597d9","html_url":"https://github.com/henribru/google-api-python-client-stubs","commit_stats":{"total_commits":82,"total_committers":2,"mean_commits":41.0,"dds":"0.012195121951219523","last_synced_commit":"07d2cb05585e7141ae0c8c15ca59d29de74069c1"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/henribru/google-api-python-client-stubs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henribru%2Fgoogle-api-python-client-stubs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henribru%2Fgoogle-api-python-client-stubs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henribru%2Fgoogle-api-python-client-stubs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henribru%2Fgoogle-api-python-client-stubs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henribru","download_url":"https://codeload.github.com/henribru/google-api-python-client-stubs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henribru%2Fgoogle-api-python-client-stubs/sbom","scorecard":{"id":461409,"data":{"date":"2025-08-11","repo":{"name":"github.com/henribru/google-api-python-client-stubs","commit":"8d07a9ca5b2ddfc8d38d97ee22eda91d02ee5658"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Maintained","score":4,"reason":"4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml: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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":"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/main.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/henribru/google-api-python-client-stubs/publish.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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-19T11:13:16.608Z","repository_id":40654234,"created_at":"2025-08-19T11:13:16.608Z","updated_at":"2025-08-19T11:13:16.608Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31518629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["annotations","google-api-python-client","googleapiclient","mypy","pep561","pylance","pyre","pyright","python","pytype","stubs","stubs-only","type-annotations","type-stubs","typed","typing"],"created_at":"2026-04-07T15:36:24.810Z","updated_at":"2026-04-07T15:36:25.298Z","avatar_url":"https://github.com/henribru.png","language":"Python","readme":"# Type stubs for google-api-python-client\n\n[![PyPI version](https://badge.fury.io/py/google-api-python-client-stubs.svg)](https://badge.fury.io/py/google-api-python-client-stubs)\n\nThis package provides type stubs for the [google-api-python-client](https://github.com/googleapis/google-api-python-client) library. \nIt allows you to type check usage of the library with e.g. [mypy](http://mypy-lang.org/) and will also improve autocomplete in many editors.\n\n**This is in no way affiliated with Google.**\n\nThe stubs were generated automatically based on Google's [Discovery Documents](https://developers.google.com/discovery/v1/reference/apis), that are bundled with google-api-python-client as of v2.\n\nIf you find incorrect annotations, please create an issue.\n\nReleases can be somewhat infrequent. If you need a new release, create an issue and I'll probably get around to it faster.\n\n## Installation\n\n```shell script\n$ pip install google-api-python-client-stubs\n```\n\nThe stubs should be automatically picked up by your editor or typechecker.\n\n## Caveats\n\n### Explicit annotations\nThe `google-api-python-client-stubs` is quite dynamic. \nAll resources are just instances of a single class with dynamically attached methods\nand the requests and responses are just dictionaries. The way this is annotated is with\nclasses and [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict)\nthat don't exist in the actual library, only in the stub files. This means you *cannot* use any of these types at runtime, it *will* cause your code to crash.\nIf you rely solely on type inference, this is not an issue, but as soon as you want to explicitly\nannotate a variable, argument or return type in your code with one of these types, you must follow these rules:\n1. Either put `from __future__ import annotations` at the top of your file or surround the annotations with quotes. \nThis ensures that Python doesn't attempt to evaluate the types at runtime. \nNote that the import is only supported in Python 3.7 and above.\n2. Only import the types inside an `if typing.TYPE_CHECKING` block. This ensures that the imports are only evaluated during\ntype checking, not at runtime.\n\nAny type not available at runtime is located under the `googleapiclient._apis` package, with a subpackage for the API and a subpackage for the API version.\nFor example, the return type of `build(\"sheets\", \"v4\")`, `SheetsResource`, should be imported from `googleapiclient._apis.sheets.v4`. Nested resources have a nested class structure, e.g. the return type of `build(\"sheets\", \"v4\").spreadsheets().values()` is `SheetsResource.SpreadsheetsResource.ValuesResource`.\nIf autocompleting import paths doesn't work you can find the correct path by using Mypy's [reveal_type](https://mypy.readthedocs.io/en/stable/common_issues.html#reveal-type)\non the thing you want to explicitly annotate. For `TypedDict`s this will also give you useful info about the structure of the dictionary.\n\nIf you use Pyright/Pylance, you'll get a [reportMissingModuleSource](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportMissingModuleSource) error at the import site, which indicates that the stub file doesn't have a corresponding source file. As long as the import only occurs during typechecking, this can be safely ignored. Autocomplete and typechecking will still work.\n\nNote that since the types don't exist at runtime, they're not compatible with libraries that evaluate annotations at runtime. For example, you can't use them to annotate a field in a Pydantic model.\n\n### Performance\nThe stubs contain a separate overload of `googleapiclient.discovery.build` for each service and version (see `discovery.pyi`). \nThis can lead to slow type inference for this function. Mypy will generally be pretty fast after the first run,\nbut you might experience slow autocomplete in your editor. If you're experiencing this problem you can bypass type inference with explicit annotations, \ne.g. `sheets_service: SheetsResource = build(\"sheets\", \"v4\")` instead of `sheets_service = build(\"sheets\", \"v4\")`.\nNote the caveats to this approach in the previous section.\n\n### Recursive types\nThe stubs previously didn't include recursive type definitions due to a lack of type checker support, but this is now included. Note that if you're using Mypy, v0.990 or higher is required for this to work.\n\n### Stubs for non-API-specific parts\nThere are detailed stubs for the API services, but other parts of the library have only been annotated with [stubgen](https://mypy.readthedocs.io/en/stable/stubgen.html),\nso they're mostly typed as `Any`. I believe these parts are mostly used internally by the library itself,\nso for most users this should be fine. Contributions to improve these stubs are welcome, though.\n\n## Development\nYou can run `create_stubs.py` to generate new stubs. Note that you should first update the google-api-python-client dependency and also clone https://github.com/googleapis/google-api-python-client.\n\nFeel free to use this to open a PR when new versions come out.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenribru%2Fgoogle-api-python-client-stubs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenribru%2Fgoogle-api-python-client-stubs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenribru%2Fgoogle-api-python-client-stubs/lists"}