File: one_to_one_1.py

package info (click to toggle)
python-odmantic 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,488 kB
  • sloc: python: 8,646; sh: 110; javascript: 45; makefile: 34; xml: 13
file content (9 lines) | stat: -rw-r--r-- 269 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
await engine.find_one(
    Country, Country.capital_city.name == "Stockholm"
)
#> Country(
#>     id=ObjectId("5f79d7e8b305f24ca43593e2"),
#>     name="Sweden",
#>     currency="Swedish krona",
#>     capital_city=CapitalCity(name="Stockholm", population=975904),
#> )