redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.12k stars 112 forks source link

"getting_started.md" doc requires some updates #235

Open oren-twigo opened 2 years ago

oren-twigo commented 2 years ago

The getting_started.md requires some fixes:

  1. In the example of: from redis_om import get_redis_connection redis_conn = get_redis_conection()

Should be updated to: from redis_om import connections redis_conn = connections.get_redis_connection()

This fix is required also in the following docs: https://github.com/redis/redis-om-python/blob/main/docs/connections.md https://github.com/redis/redis-om-python/blob/main/docs/models.md

  1. a small typo: replace "...Here, we run JSON.GET command with.." with "...Here, we run HGETALL command with..."

  2. It is better to add some link or duplicate the following article into this repo docs: https://redis.io/docs/stack/get-started/tutorials/stack-python/

  3. in https://github.com/redis/redis-om-python/blob/main/docs/models.md the description of "primary_key_pattern" setting is not clear enough. Missing an example for anything but the default "{pk}" value.

  4. it is better to show an example the auto-generated pk (ULID) can be simple overridden with any other value before the "save" command. This allows to create keys which are composed of other fields' values, and not a single UUID. for example: for relation "table" between two models.

simonprickett commented 2 years ago

Thanks - I'll take a look as able... if you'd like to create a PR for (2) you can become a contributor!