-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add to_dict method to domain classes #270
base: main
Are you sure you want to change the base?
Conversation
033c20d
to
6c8e129
Compare
I first intended to use this to help with the hetzner.hcloud ansible collection inventory caching implementation. But I choose to use another method. This might still be useful for the users of the library, to be able to export the entire domain object to a dict. |
2c4d580
to
8d2ab43
Compare
b5369df
to
5c4501e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #270 +/- ##
==========================================
+ Coverage 92.85% 92.97% +0.12%
==========================================
Files 65 64 -1
Lines 2883 2891 +8
==========================================
+ Hits 2677 2688 +11
+ Misses 206 203 -3 ☔ View full report in Codecov by Sentry. |
This PR has been marked as stale because it has not had recent activity. The bot will close the PR if no further action occurs. |
This PR has been marked as stale because it has not had recent activity. The bot will close the PR if no further action occurs. |
This allows us to serialize the domain classes by first converting them to "dumb types". For example, to convert the objects to JSON.