Skip to content

Commit

Permalink
SE-1356 README update
Browse files Browse the repository at this point in the history
  • Loading branch information
medhatphq committed Jul 17, 2024
1 parent 5a7284e commit f779514
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,16 @@ phq = Client(access_token="abc123")


suggested_radius = phq.radius.search(location__origin="45.5051,-122.6750")
print(suggested_radius.radius, suggested_radius.radius_unit, suggested_radius.location.to_dict())
print(suggested_radius.radius, suggested_radius.radius_unit, suggested_radius.location.model_dump(exclude_none=True))
```

### Serializing search results into a dictionary

All search results can be serialized to a dictionary using the `.model_dump(exclude_none=True)` method call.
All search results can be serialized into a dictionary using the `.model_dump()` method call.

To keep `None` values use `.model_dump()`

To remove `None` values use `.model_dump(exclude_none=True)`

Examples:

Expand Down

0 comments on commit f779514

Please sign in to comment.