kubernetes-client / kubernetes-client/python
Growing library size
- Dominant language
- Python
- Stars
- 7.7k
- Forks
- 3.5k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 18
Description
According to dive, this library is now 79 MB in my Docker image:
This seems excessive for a Python library, and if multiplied by the number of users, it's arguably a serious waste of resources. Based on just the sizes, `client` and `aio/client` are mostly duplicates. Under that both `api` and `models` are huge, their `__pycache__` are similarly huge. Inside `models`, functions like `_get_openapi_to_dict`, `_to_legacy_item`, `_to_legacy_value`, `_to_openapi_value` are basically the same, along with some member methods. Could you please do something to reduce this duplication, and the library size along with it?
Contributor guide
Research direction
Start by using the reported dive results to compare the sizes and contents of client, aio/client, api, and models, including their __pycache__ directories. Read the duplicated functions in models, such as _get_openapi_to_dict and _to_legacy_item, to determine which duplication can be removed; done means reducing the library or Docker image size without losing client behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100