1# Google API Client 2 3[](https://badge.fury.io/py/google-api-python-client) 4 5This is the [Google API Python client library](https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries) 6for Google's discovery based APIs. To get started, please see the 7[docs folder](https://github.com/googleapis/google-api-python-client/blob/main/docs/README.md). 8 9This library is considered complete and is in maintenance mode. This means 10that we will address critical bugs and security issues but will not add any 11new features. 12 13This library is officially supported by Google. However, the maintainers of 14this repository recommend using [Cloud Client Libraries for Python](https://github.com/googleapis/google-cloud-python), 15where possible, for new code development. For more information, please visit 16[Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). 17 18## Version 2.0 Release 19The 2.0 release of `google-api-python-client` includes a substantial reliability 20improvement, compared with 1.x, as discovery documents are now cached in the library 21rather than fetched dynamically. It is highly recommended to upgrade from v1.x to v2.x. 22 23Only python 3.6 and newer is supported. If you are not able to upgrade python, then 24please continue to use version 1.x as we will continue supporting python 2.7+ in 25[v1](https://github.com/googleapis/google-api-python-client/tree/v1). 26 27Discovery documents will no longer be retrieved dynamically when 28you call `discovery.build()`. The discovery documents will instead be retrieved 29from the client library directly. New versions of this library are released weekly. 30As a result of caching the discovery documents, the size of this package is at least 3150 MB larger compared to the previous version. 32 33Please see the [Migration Guide](https://github.com/googleapis/google-api-python-client/blob/main/UPGRADING.md) 34for more information. 35 36## Documentation 37 38See the [docs folder](https://github.com/googleapis/google-api-python-client/blob/main/docs/README.md) for more detailed instructions and additional documentation. 39 40## Other Google API libraries 41 42The maintainers of this repository recommend using 43[Cloud Client Libraries for Python](https://github.com/googleapis/google-cloud-python), 44where possible, for new code development due to the following reasons: 45 46With [Cloud Client Libraries for Python](https://github.com/googleapis/google-cloud-python): 47- There is a separate client library for each API, so you can choose 48which client libraries to download. Whereas, `google-api-python-client` is a 49single client library for all APIs. As a result, the total package size for 50`google-api-python-client` exceeds 50MB. 51- There are stricter controls for breaking changes to the underlying APIs 52as each client library is focused on a specific API. 53- There are more features in these Cloud Client Libraries as each library is 54focused on a specific API, and in some cases, the libraries are owned by team 55who specialized in that API. 56- Developers will benefit from intellisense. 57 58For more information, please visit 59[Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). 60 61Although there are many benefits to moving to 62[Cloud Client Libraries for Python](https://github.com/googleapis/google-cloud-python), 63the maintainers want to emphasize that `google-api-python-client` will continue 64to be supported. 65 66For Google Ads API, we recommend using [Google Ads API Client Library for Python](https://github.com/googleads/google-ads-python/). 67 68For Google Firebase Admin API, we recommend using [Firebase Admin Python SDK](https://github.com/firebase/firebase-admin-python). 69 70## Installation 71 72Install this library in a [virtualenv](https://virtualenv.pypa.io/en/latest/) using pip. virtualenv is a tool to 73create isolated Python environments. The basic problem it addresses is one of 74dependencies and versions, and indirectly permissions. 75 76With virtualenv, it's possible to install this library without needing system 77install permissions, and without clashing with the installed system 78dependencies. 79 80### Mac/Linux 81 82``` 83pip install virtualenv 84virtualenv <your-env> 85source <your-env>/bin/activate 86<your-env>/bin/pip install google-api-python-client 87``` 88 89### Windows 90 91``` 92pip install virtualenv 93virtualenv <your-env> 94<your-env>\Scripts\activate 95<your-env>\Scripts\pip.exe install google-api-python-client 96``` 97 98## Supported Python Versions 99 100Python 3.6, 3.7, 3.8, 3.9 and 3.10 are fully supported and tested. This library may work on later versions of 3, but we do not currently run tests against those versions. 101 102## Unsupported Python Versions 103 104Python < 3.6 105 106## Third Party Libraries and Dependencies 107 108The following libraries will be installed when you install the client library: 109* [httplib2](https://github.com/httplib2/httplib2) 110* [uritemplate](https://github.com/sigmavirus24/uritemplate) 111 112For development you will also need the following libraries: 113* [WebTest](http://webtest.pythonpaste.org/en/latest/index.html) 114* [pyopenssl](https://pypi.python.org/pypi/pyOpenSSL) 115 116## Contributing 117 118Please see our [Contribution Guide](https://github.com/googleapis/google-api-python-client/blob/main/CONTRIBUTING.rst). 119In particular, we love pull requests - but please make sure to sign 120the contributor license agreement. 121