Introduce typed DTOs in API arguments and responses
- Dominant language
- Python
- Stars
- 537
- Forks
- 118
- PR merge metrics
- No merged PRs in 30d
Description
## Long story short
Currently collections have different return values, containers.list() returns list of container objects whereas all other objects return the raw response from Docker engine as dict.
* Expected behaviour:
All object.list() calls return object collections
* Actual behaviour:
Return values are different for container and all others objects (volume, image, ...)
## Details
As a user I'd expect to get a collection of objects from a .list() call. However, it might make sense to have access to the raw response too.
docker-py has different classes for each object, one api object for low-level stuff and a model object for high-level access. This seems to be a good approach in my opinion.
I'd be willing to provide a PR, but first I'd like to get some input on where to go, maybe there are some things I didn't consider,.
Contributor guide
Assessment
This issue has not been assessed yet.