python3-dacite binary package in Ubuntu Lunar amd64
Passing plain dictionaries as a data container between your functions or
methods isn't a good practice. Of course you can always create your
custom class instead, but this solution is an overkill if you only want
to merge a few fields within a single object.
.
Fortunately Python has a good solution to this problem - data classes.
Thanks to `@dataclass` decorator you can easily create a new custom
type with a list of given fields in a declarative manner. Data classes
support type hints by design.
.
However, even if you are using data classes, you have to create their
instances somehow. In many such cases, your input is a dictionary - it
can be a payload from a HTTP request or a raw data from a database. If
you want to convert those dictionaries into data classes, `dacite` is
your best friend.
.
This library was originally created to simplify creation of type hinted
data transfer objects (DTO) which can cross the boundaries in the
application architecture.
.
It's important to mention that `dacite` is not a data validation library.
There are dozens of awesome data validation projects and it doesn't make
sense to duplicate this functionality within `dacite`. If you want to
validate your data first, you should combine `dacite` with one of data
validation library.
Publishing history
Date | Status | Target | Component | Section | Priority | Phased updates | Version | ||
---|---|---|---|---|---|---|---|---|---|
2023-03-15 06:44:32 UTC | Published | Ubuntu Lunar amd64 | release | main | python | Optional | 1.8.0-1 | ||
|
|||||||||
2023-03-15 06:45:26 UTC | Superseded | Ubuntu Lunar amd64 | release | universe | python | Optional | 1.8.0-1 | ||
|
|||||||||
Deleted | Ubuntu Lunar amd64 | proposed | universe | python | Optional | 1.8.0-1 | |||
|
|||||||||
2023-02-17 01:54:48 UTC | Superseded | Ubuntu Lunar amd64 | release | universe | python | Optional | 1.7.0-1 | ||
|
|||||||||
2023-02-18 06:10:11 UTC | Deleted | Ubuntu Lunar amd64 | proposed | universe | python | Optional | 1.7.0-1 | ||
|
|||||||||
2022-12-29 01:09:17 UTC | Superseded | Ubuntu Lunar amd64 | release | universe | python | Optional | 1.6.0-2 | ||
|