firebase-admin-python
firebase-admin-python copied to clipboard
google-api-python-client dependency adds 50+MB to the application
[READ] Step 1: Are you in the right place?
- For issues related to the code in this repository file a GitHub issue.
- If the issue pertains to Cloud Firestore, report directly in the Python Firestore GitHub repo. Firestore bugs reported in this repo will be closed with a reference to the Python Firestore project.
- For general technical questions, post a question on StackOverflow
with the
firebasetag. - For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: Amazon Linux 2
- Firebase SDK version: unknown
- Firebase Product: messaging
- Python version: 3.9
- Pip version: 22.1.2
[REQUIRED] Step 3: Describe the problem
This library's dependency on all of google-api-python-client pulls in 50+MB of code, causing our AWS Lambda deployment to be over AWS's package size limit.
Does this library really need to depend on all of google-api-python-client? As per https://pypi.org/project/google-api-python-client/ "There is a separate client library for each API, so you can choose which client libraries to download. Whereas, google-api-python-client is a single client library for all APIs. As a result, the total package size for google-api-python-client exceeds 50MB."
Steps to reproduce:
Depend on this library.
Relevant Code:
N/A
I have the same issue.
I have made a feature request to Firebase support regarding this issue to be able to split the packages when installing firebase-admin and when we only use firebase-messaging for example.
I'm also having the same issue but didn't find any solution so far.
This is a major issue. Even the README.md at https://github.com/googleapis/google-api-python-client says:
The maintainers of this repository recommend using Cloud Client Libraries for Python, where possible, for new code development due to the following reasons:
With Cloud Client Libraries for Python:
- There is a separate client library for each API, so you can choose which client libraries to download. Whereas,
google-api-python-clientis a single client library for all APIs. As a result, the total package size forgoogle-api-python-clientexceeds 50MB.- There are stricter controls for breaking changes to the underlying APIs as each client library is focused on a specific API.
- There are more features in these Cloud Client Libraries as each library is focused on a specific API, and in some cases, the libraries are owned by team who specialized in that API.
- Developers will benefit from intellisense.
I strongly suggest that this codebase should be migrated to use the packages in https://github.com/googleapis/google-cloud-python instead.