art049 / art049/odmantic

Dump an model excluding `none` values

Open
#504 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
1.2k
Forks
97
PR merge metrics
No merged PRs in 30d

Description

# Feature request

### Context

I don't want to waste database space writing empty data.

### Solution

Adding `exclude_none` paramater to `model_dump_doc` would solve the problem.

Contributor guide

Open the contributing guide

Research direction

Start by locating the model_dump_doc entry point and inspect how its current parameters control document serialization. Add support for the requested exclude_none option, then verify that empty model values are omitted from the dumped document.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
database
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.