From a9447d2fbfa7a50f04d9e4ef2b89fa77ae278541 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 30 Apr 2023 10:25:04 +0300 Subject: [PATCH 1/4] Updating the getting started to highlight the redis-stack-server docker --- README.md | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 01c4ccef..e4f336df 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -
+

Redis OM @@ -18,7 +18,7 @@ [![License][license-image]][license-url] [![Build Status][ci-svg]][ci-url] -**Redis OM Python** makes it easy to model Redis data in your Python applications. +**Redis OM Python** makes it easy to model Redis data in your Python applications. [Redis OM .NET](https://github.com/redis/redis-om-dotnet) | [Redis OM Node.js](https://github.com/redis/redis-om-node) | [Redis OM Spring](https://github.com/redis/redis-om-spring) | **Redis OM Python** @@ -30,13 +30,14 @@ span - [💡 Why Redis OM?](#-why-redis-om) +- [💻 Installation](#-installation) +- [🏁 Getting started](#-getting-started) - [📇 Modeling Your Data](#-modeling-your-data) - [✓ Validating Data With Your Model](#-validating-data-with-your-model) - [🔎 Rich Queries and Embedded Models](#-rich-queries-and-embedded-models) - [Querying](#querying) - [Embedded Models](#embedded-models) - [Calling Other Redis Commands](#calling-other-redis-commands) -- [💻 Installation](#-installation) - [📚 Documentation](#-documentation) - [⛏️ Troubleshooting](#️-troubleshooting) - [✨ So How Do You Get RediSearch and RedisJSON?](#-so-how-do-you-get-redisearch-and-redisjson) @@ -57,6 +58,31 @@ This **preview** release contains the following features: * Declarative secondary-index generation * Fluent APIs for querying Redis +## 💻 Installation + +Installation is simple with `pip`, Poetry, or Pipenv. + +```sh +# With pip +$ pip install redis-om + +# Or, using Poetry +$ poetry add redis-om +``` + +## 🏁 Getting started + +### Starting Redis + +Before writing any code you'll need a Redis instance with the appropriate Redis modules! The quickest way to get this is with Docker: + +```sh +docker run -p 6379:6379 -p 8001:8001 redis/redis-stack +``` + +This launches the [redis-stack](https://redis.io/docs/stack/) an extension of Redis that adds all manner of modern data structures to Redis. You'll also notice that if you open up http://localhost:8001 you'll have access to the redis-insight GUI, a GUI you can use to visualize and work with your data in Redis. + + ## 📇 Modeling Your Data Redis OM contains powerful declarative models that give you data validation, serialization, and persistence to Redis. @@ -326,18 +352,6 @@ redis_conn = get_redis_connection() redis_conn.set("hello", "world") ``` -## 💻 Installation - -Installation is simple with `pip`, Poetry, or Pipenv. - -```sh -# With pip -$ pip install redis-om - -# Or, using Poetry -$ poetry add redis-om -``` - ## 📚 Documentation The Redis OM documentation is available [here](docs/index.md). From f2da8545123d6c18d056f634ea25ab986036b2df Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Sun, 30 Apr 2023 13:31:22 +0600 Subject: [PATCH 2/4] Remove trailing space --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4f336df..a68f356c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ [![License][license-image]][license-url] [![Build Status][ci-svg]][ci-url] -**Redis OM Python** makes it easy to model Redis data in your Python applications. +**Redis OM Python** makes it easy to model Redis data in your Python applications. [Redis OM .NET](https://github.com/redis/redis-om-dotnet) | [Redis OM Node.js](https://github.com/redis/redis-om-node) | [Redis OM Spring](https://github.com/redis/redis-om-spring) | **Redis OM Python** From 019abf5e9bfff92b3c825edfdabd23963fedb957 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 30 Apr 2023 12:24:26 +0300 Subject: [PATCH 3/4] Restoring accidentally removed line --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a68f356c..fe643fc7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +


Redis OM @@ -230,7 +230,7 @@ from redis_om import ( Migrator ) - + class Customer(HashModel): first_name: str last_name: str = Field(index=True) @@ -254,7 +254,7 @@ Customer.find(Customer.last_name == "Brookins").all() # Find all customers that do NOT have the last name "Brookins" Customer.find(Customer.last_name != "Brookins").all() -# Find all customers whose last name is "Brookins" OR whose age is +# Find all customers whose last name is "Brookins" OR whose age is # 100 AND whose last name is "Smith" Customer.find((Customer.last_name == "Brookins") | ( Customer.age == 100 @@ -307,7 +307,7 @@ class Customer(JsonModel): address: Address -# With these two models and a Redis deployment with the RedisJSON +# With these two models and a Redis deployment with the RedisJSON # module installed, we can run queries like the following. # Before running queries, we need to run migrations to set up the From 1a2a53414322c15d62f67382fb9299164b3a65c8 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 30 Apr 2023 12:25:09 +0300 Subject: [PATCH 4/4] spelling --- .github/wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index e30a2686..ce4926e4 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -55,3 +55,4 @@ utf validator validators virtualenv +http