Merge pull request #24 from simonprickett/patch-2

Formatting fix for creating a customer and minor typo fix.
This commit is contained in:
Andrew Brookins 2021-11-18 17:31:47 -08:00 committed by GitHub
commit f178f43fdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,11 +118,11 @@ Next, start the server:
$ poetry run uvicorn --reload main:test
Then, in another shell, create a customer:
```
$ curl -X POST "http://localhost:8000/customer" -H 'Content-Type: application/json' -d '{"first_name":"Andrew","last_name":"Brookins","email":"a@example.com","age":"38","join_date":"2020
-01-02"}'
{"pk":"01FM2G8EP38AVMH7PMTAJ123TA","first_name":"Andrew","last_name":"Brookins","email":"a@example.com","join_date":"2020-01-02","age":38,"bio":""}
```
Get a copy of the value for "pk" and make another request to get that customer:
$ curl "http://localhost:8000/customer/01FM2G8EP38AVMH7PMTAJ123TA"
@ -133,7 +133,7 @@ You can also get a list of all customer PKs:
$ curl "http://localhost:8000/customers"
{"customers":["01FM2G8EP38AVMH7PMTAJ123TA"]}
## Redsi OM with Asyncio
## Redis OM with Asyncio
Redis OM is designed to work with asyncio, so you can use Redis OM models asynchronously within FastAPI applications.