Skip to content

Intorduce property_field decorator and fix for pydantic_only plus optimization - #64

Merged
collerek merged 7 commits into
masterfrom
pydantic_only
Dec 4, 2020
Merged

Intorduce property_field decorator and fix for pydantic_only plus optimization#64
collerek merged 7 commits into
masterfrom
pydantic_only

Conversation

@collerek

@collerek collerek commented Dec 4, 2020

Copy link
Copy Markdown
Collaborator
  • Performance optimization
  • Fix for bug with pydantic_only fields being required
  • Add property_field decorator that registers a function as a property that will
    be included in Model.dict() and in fastapi response
  • Update docs

@codecov-io

codecov-io commented Dec 4, 2020

Copy link
Copy Markdown

Codecov Report

Merging #64 (f071d45) into master (40254b9) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master       #64    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           65        69     +4     
  Lines         5747      5902   +155     
==========================================
+ Hits          5747      5902   +155     
Impacted Files Coverage Δ
ormar/__init__.py 100.00% <100.00%> (ø)
ormar/decorators/__init__.py 100.00% <100.00%> (ø)
ormar/decorators/property_field.py 100.00% <100.00%> (ø)
ormar/fields/model_fields.py 100.00% <100.00%> (ø)
ormar/models/metaclass.py 100.00% <100.00%> (ø)
ormar/models/modelproxy.py 100.00% <100.00%> (ø)
ormar/models/newbasemodel.py 100.00% <100.00%> (ø)
ormar/models/quick_access_views.py 100.00% <100.00%> (ø)
tests/test_excluding_fields_in_fastapi.py 100.00% <100.00%> (ø)
tests/test_properties.py 100.00% <100.00%> (ø)
... and 5 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants