diff --git a/docs/create/cloudrun/index-cloudrun.mdx b/docs/create/cloudrun/index-cloudrun.mdx index e8dfbd2eca..f75d7b51d3 100644 --- a/docs/create/cloudrun/index-cloudrun.mdx +++ b/docs/create/cloudrun/index-cloudrun.mdx @@ -55,8 +55,6 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ::: -![Registering for Redis Cloud](images/rediscloud_endpoint.png "image_tooltip") - ### Step 2. Install Google Cloud CLI diff --git a/docs/create/heroku/herokugo/index-herokugo.mdx b/docs/create/heroku/herokugo/index-herokugo.mdx index c0edd8fd2b..e19f155ef4 100644 --- a/docs/create/heroku/herokugo/index-herokugo.mdx +++ b/docs/create/heroku/herokugo/index-herokugo.mdx @@ -34,13 +34,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](try-free.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](launch_database.png) - -The database endpoint URL is unique so will be different in your case. Save the URL details, port and password for future reference. - +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. ### Step 2. Create a Heroku account diff --git a/docs/create/heroku/herokujava/index-herokujava.mdx b/docs/create/heroku/herokujava/index-herokujava.mdx index d01a10cc73..ed0d1504be 100644 --- a/docs/create/heroku/herokujava/index-herokujava.mdx +++ b/docs/create/heroku/herokujava/index-herokujava.mdx @@ -32,12 +32,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](try-free.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](launch_database.png) - -The database endpoint URL is unique for all and hence might be different in your case. Save it for future reference. +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. diff --git a/docs/create/heroku/herokunodejs/index-herokunodejs.mdx b/docs/create/heroku/herokunodejs/index-herokunodejs.mdx index 2ba8a75d4b..32dd380f6c 100644 --- a/docs/create/heroku/herokunodejs/index-herokunodejs.mdx +++ b/docs/create/heroku/herokunodejs/index-herokunodejs.mdx @@ -25,13 +25,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](try-free.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](launch_database.png) - -The database endpoint URL is unique for all and hence might be different in your case. Save it for future reference. - +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. ### Step 2. Create a Heroku account diff --git a/docs/create/heroku/herokupython/index-herokupython.mdx b/docs/create/heroku/herokupython/index-herokupython.mdx index 0f53b52e02..c9de02e708 100644 --- a/docs/create/heroku/herokupython/index-herokupython.mdx +++ b/docs/create/heroku/herokupython/index-herokupython.mdx @@ -31,14 +31,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](try-free.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](launch_database.png) - -The database endpoint URL is unique for all and hence might be different in your case. Save it for future reference. - - +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. ### Step 2. Create a Heroku account diff --git a/docs/create/heroku/herokuruby/index-herokuruby.mdx b/docs/create/heroku/herokuruby/index-herokuruby.mdx index c246089b29..510c40ef4a 100644 --- a/docs/create/heroku/herokuruby/index-herokuruby.mdx +++ b/docs/create/heroku/herokuruby/index-herokuruby.mdx @@ -26,21 +26,12 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](try-free.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](launch_database.png) - -The database endpoint URL is unique so will be different in your case. Save it for future reference. - - +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. ### Step 2. Create a Heroku account If you are using Heroku for the first time, create your new Heroku account [through this link](https://signup.heroku.com/login). -![heroku](create_heroku.png) - ### Step 3. Install the Heroku CLI on your system diff --git a/docs/create/heroku/portal/index-heroku.mdx b/docs/create/heroku/portal/index-heroku.mdx index 9c567cb5fd..6fdbc0d84e 100644 --- a/docs/create/heroku/portal/index-heroku.mdx +++ b/docs/create/heroku/portal/index-heroku.mdx @@ -45,13 +45,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](tryfree.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](launch_database.png) - -The database endpoint URL is unique for all and hence might be different in your case. Save it for future reference. - +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. #### Step 2. Create a Heroku account diff --git a/docs/create/heroku/ratelimiting-go/index-ratelimitinggo.mdx b/docs/create/heroku/ratelimiting-go/index-ratelimitinggo.mdx index 09918f9a13..d37a62c4e7 100644 --- a/docs/create/heroku/ratelimiting-go/index-ratelimitinggo.mdx +++ b/docs/create/heroku/ratelimiting-go/index-ratelimitinggo.mdx @@ -24,13 +24,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ![recloud](images/try-free.png) -[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database as shown below: - - -![heroku](images/launch_database.png) - -The database endpoint URL is unique for all and hence might be different in your case. Save it for future reference. - +[Follow this link to create a Redis Enterprise Cloud](/create/rediscloud) subscription and database. Once you create the database, you will be provisioned with a unique database endpoint URL, port and password. Save these for future reference. ### Step 2. Create a Heroku account diff --git a/docs/create/netlify/getting-started-with-netlify/database_details.png b/docs/create/netlify/getting-started-with-netlify/database_details.png new file mode 100644 index 0000000000..5007a480b0 Binary files /dev/null and b/docs/create/netlify/getting-started-with-netlify/database_details.png differ diff --git a/docs/create/netlify/getting-started-with-netlify/details_database.png b/docs/create/netlify/getting-started-with-netlify/details_database.png new file mode 100644 index 0000000000..3881cf0272 Binary files /dev/null and b/docs/create/netlify/getting-started-with-netlify/details_database.png differ diff --git a/docs/create/netlify/getting-started-with-netlify/index-getting-started-with-netlify.mdx b/docs/create/netlify/getting-started-with-netlify/index-getting-started-with-netlify.mdx index 302111fa01..1f3a7fc401 100644 --- a/docs/create/netlify/getting-started-with-netlify/index-getting-started-with-netlify.mdx +++ b/docs/create/netlify/getting-started-with-netlify/index-getting-started-with-netlify.mdx @@ -61,8 +61,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise ::: -![rediscloud](recloud_search.png) - +![rediscloud](details_database.png) ### Step 2. Install Netlify CLI diff --git a/docs/create/vercel/images/details_database.png b/docs/create/vercel/images/details_database.png new file mode 100644 index 0000000000..3881cf0272 Binary files /dev/null and b/docs/create/vercel/images/details_database.png differ diff --git a/docs/create/vercel/index-vercel.mdx b/docs/create/vercel/index-vercel.mdx index c7089505c1..c3505623a7 100644 --- a/docs/create/vercel/index-vercel.mdx +++ b/docs/create/vercel/index-vercel.mdx @@ -58,7 +58,7 @@ For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise -![alt_text](images/rediscloud_endpoint.png "image_tooltip") +![alt_text](images/details_database.png "image_tooltip") ### Step 2. Install Vercel CLI @@ -135,7 +135,7 @@ Let us first set up environment variables. vercel env add Vercel CLI 23.1.2 ? What's the name of the variable? REDIS_ENDPOINT_URI -? What's the value of REDIS_ENDPOINT_URI? redis-XXXX.c264.ap-south-1-1.ec2.cloud.redislabs.com:XXX +? What's the value of REDIS_ENDPOINT_URI? redis-XXXX.c110-qa.us-east-1-1-1.ec2.qa-cloud.redislabs.com:XXX ``` diff --git a/docs/howtos/redisai/getting-started/index-gettingstarted.mdx b/docs/howtos/redisai/getting-started/index-gettingstarted.mdx index 1cd76d8487..6b4b94daff 100644 --- a/docs/howtos/redisai/getting-started/index-gettingstarted.mdx +++ b/docs/howtos/redisai/getting-started/index-gettingstarted.mdx @@ -257,3 +257,4 @@ Define inputs for the loaded model. + diff --git a/docs/howtos/redisbloom/index-redisbloom.mdx b/docs/howtos/redisbloom/index-redisbloom.mdx index 00738e7c1a..8e9e1fd4ea 100644 --- a/docs/howtos/redisbloom/index-redisbloom.mdx +++ b/docs/howtos/redisbloom/index-redisbloom.mdx @@ -49,28 +49,13 @@ You will be provided with Public endpoint URL and "Redis Stack" as the type of d ![verify database](images/details_database.png) -### Step 4. Install RedisInsight +### Step 4. Using RedisInsight RedisInsight is a visual tool that lets you do both GUI- and CLI-based interactions with your Redis database, and so much more when developing your Redis based application. It is a fully-featured pure Desktop GUI client that provides capabilities to design, develop and optimize your Redis application. It works with any cloud provider as long as you run it on a host with network access to your cloud-based Redis server. It makes it easy to discover cloud databases and configure connection details with a single click. It allows you to automatically add Redis Enterprise Software and Redis Enterprise Cloud databases. -You can install Redis Stack on your local system to get RedisInsight GUI tool up and running. Ensure that you have `brew` package installed in your Mac system. - - - ```bash - brew tap redis-stack/redis-stack - brew install --cask redis-stack - ``` - -``` - ==> Installing Cask redis-stack-redisinsight - ==> Moving App 'RedisInsight-preview.app' to '/Applications/RedisInsight-preview.app' - 🍺 redis-stack-redisinsight was successfully installed! - ==> Installing Cask redis-stack - 🍺 redis-stack was successfully installed! - ``` - -Go to Applications and click "RedisInsight Preview" to bring up the Redis Desktop GUI tool. +[Follow this link](/explore/redisinsightv2/getting-started) to install RedisInsight v2 on your local system. +Assuming that you already have RedisInsight v2 installed on your MacOS, you can browse through the Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. ### Step 5. Add Redis database diff --git a/docs/howtos/redisearch/index-redisearch.mdx b/docs/howtos/redisearch/index-redisearch.mdx index e6db52b43f..da508482c4 100644 --- a/docs/howtos/redisearch/index-redisearch.mdx +++ b/docs/howtos/redisearch/index-redisearch.mdx @@ -43,27 +43,11 @@ You will be provided with Public endpoint URL and "Redis Stack" as the type of d ![verify database](images/details_database.png) -### Step 4. Install RedisInsight +### Step 4. Using RedisInsight RedisInsight is a visual tool that lets you do both GUI- and CLI-based interactions with your Redis database, and so much more when developing your Redis based application. It is a fully-featured pure Desktop GUI client that provides capabilities to design, develop and optimize your Redis application. It works with any cloud provider as long as you run it on a host with network access to your cloud-based Redis server. It makes it easy to discover cloud databases and configure connection details with a single click. It allows you to automatically add Redis Enterprise Software and Redis Enterprise Cloud databases. -You can install Redis Stack on your local system to get the RedisInsight GUI tool up and running. Ensure that you have `brew` package installed in your Mac system. - - - ```bash - brew tap redis-stack/redis-stack - brew install --cask redis-stack - ``` - -``` - ==> Installing Cask redis-stack-redisinsight - ==> Moving App 'RedisInsight-preview.app' to '/Applications/RedisInsight-preview.app' - 🍺 redis-stack-redisinsight was successfully installed! - ==> Installing Cask redis-stack - 🍺 redis-stack was successfully installed! - ``` - -Go to Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. +Assuming that you already have RedisInsight v2 installed on your MacOS, you can browse through the Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. ### Step 5. Add Redis database diff --git a/docs/howtos/redisjson/getting-started/index-gettingstarted.mdx b/docs/howtos/redisjson/getting-started/index-gettingstarted.mdx index c817c08f08..3e87c7a4ce 100644 --- a/docs/howtos/redisjson/getting-started/index-gettingstarted.mdx +++ b/docs/howtos/redisjson/getting-started/index-gettingstarted.mdx @@ -40,29 +40,15 @@ You will be provided with Public endpoint URL and "Redis Stack" as the type of d ![verify database](details_database.png) -### Step 4. Install RedisInsight +### Step 4. Using RedisInsight RedisInsight is a visual tool that lets you do both GUI- and CLI-based interactions with your Redis database, and so much more when developing your Redis based application. It is a fully-featured pure Desktop GUI client that provides capabilities to design, develop and optimize your Redis application. It works with any cloud provider as long as you run it on a host with network access to your cloud-based Redis server. It makes it easy to discover cloud databases and configure connection details with a single click. It allows you to automatically add Redis Enterprise Software and Redis Enterprise Cloud databases. -You can install Redis Stack on your local system to get RedisInsight GUI tool up and running. Ensure that you have `brew` package installed in your Mac system. +[Follow this link](/explore/redisinsightv2/getting-started) to install RedisInsight v2 on your local system. +Assuming that you already have RedisInsight v2 installed on your MacOS, you can browse through the Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. - ```bash - brew tap redis-stack/redis-stack - brew install --cask redis-stack - ``` - -``` - ==> Installing Cask redis-stack-redisinsight - ==> Moving App 'RedisInsight-preview.app' to '/Applications/RedisInsight-preview.app' - 🍺 redis-stack-redisinsight was successfully installed! - ==> Installing Cask redis-stack -🍺 redis-stack was successfully installed! - ``` - -Go to Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. - -### Step 6. Enter Redis Enterprise Cloud details +### Step 5. Enter Redis Enterprise Cloud details Add the Redis Enterprise cloud database endpoint, port and password. @@ -70,16 +56,14 @@ Add the Redis Enterprise cloud database endpoint, port and password. ![access redisinsight](database_creds.png) -### Step 7. Verify the database under RedisInsight dashboard +### Step 6. Verify the database under RedisInsight dashboard ![database details](database_details.png) - - -### Step 6. Getting Started with RedisJSON +### Step 7. Getting Started with RedisJSON The following steps use some basic RedisJSON commands. You can run them from the Redis command-line interface (redis-cli) or use the CLI available in RedisInsight. diff --git a/docs/howtos/redisjson/using-python/images/add_database.png b/docs/howtos/redisjson/using-python/images/add_database.png new file mode 100644 index 0000000000..9ada742a2f Binary files /dev/null and b/docs/howtos/redisjson/using-python/images/add_database.png differ diff --git a/docs/howtos/redisjson/using-python/images/database_creds.png b/docs/howtos/redisjson/using-python/images/database_creds.png new file mode 100644 index 0000000000..ef6379e72b Binary files /dev/null and b/docs/howtos/redisjson/using-python/images/database_creds.png differ diff --git a/docs/howtos/redisjson/using-python/images/database_details.png b/docs/howtos/redisjson/using-python/images/database_details.png new file mode 100644 index 0000000000..5007a480b0 Binary files /dev/null and b/docs/howtos/redisjson/using-python/images/database_details.png differ diff --git a/docs/howtos/redisjson/using-python/images/details_database.png b/docs/howtos/redisjson/using-python/images/details_database.png new file mode 100644 index 0000000000..3881cf0272 Binary files /dev/null and b/docs/howtos/redisjson/using-python/images/details_database.png differ diff --git a/docs/howtos/redisjson/using-python/images/select_cloud_vendor.png b/docs/howtos/redisjson/using-python/images/select_cloud_vendor.png new file mode 100644 index 0000000000..2526223c80 Binary files /dev/null and b/docs/howtos/redisjson/using-python/images/select_cloud_vendor.png differ diff --git a/docs/howtos/redisjson/using-python/index-usingpython.mdx b/docs/howtos/redisjson/using-python/index-usingpython.mdx index 35909e9cd1..4ac7ceb390 100644 --- a/docs/howtos/redisjson/using-python/index-usingpython.mdx +++ b/docs/howtos/redisjson/using-python/index-usingpython.mdx @@ -7,42 +7,62 @@ slug: /howtos/redisjson/using-python [RedisJSON](https://oss.redis.com/redisjson/) is a source-available Redis module that lets you store, manipulate, and query JSON documents in Redis. The standard Redis Python client (v4.0 or greater) supports all of the features of RedisJSON, and in this tutorial, we'll see how to get started with them. -## Getting started with RedisJSON +### Step 1. Create a free Cloud account -To run the examples below, you'll need to ensure that you have an instance of Redis that includes RedisJSON. If you're developing locally, you can use Docker for this: +Create your free Redis Enterprise Cloud account. Once you click on β€œGet Started”, you will receive an email with a link to activate your account and complete your signup process. -```bash - docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest -``` +:::info TIP +For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise Cloud and try all the advanced capabilities! -## Verify that the RedisJSON module is loaded +:tada: [Click here to sign up](https://redis.com/try-free) -Connect to Redis using `redis-cli`, and run the `info modules` command: +::: -```bash - redis-cli - 127.0.0.1:6379> info modules - # Modules - module:name=ReJSON,ver=20004,api=1,filters=0,usedby=[],using=[],options=[] - 127.0.0.1:6379> -``` +### Step 2. Create Your database -Ensure that you're running RedisJSON v2.0 or greater (here indicated as `20004`). +Choose your preferred cloud vendor. Select the region and then click "Let's start free" to create your free database automatically. -## Load the latest version of `redis-py` +:::info TIP +If you want to create a custom database with your preferred name and type of redis, +click "Create a custom database" option shown in the image. +::: -You'll need `redis-py` version 4.0 or later. If you're using `pipenv`, you can install the client library like so: +![create database ](images/select_cloud_vendor.png) -```bash -pipenv install redis -``` -Then you can run `pipenv graph` to make sure you're running the latest version of the client: +### Step 3. Verify the database details + +You will be provided with Public endpoint URL and "Redis Stack" as the type of database with the list of modules that comes by default. + + + +![verify database](images/details_database.png) + +### Step 4. Using RedisInsight + + +RedisInsight is a visual tool that lets you do both GUI- and CLI-based interactions with your Redis database, and so much more when developing your Redis based application. It is a fully-featured pure Desktop GUI client that provides capabilities to design, develop and optimize your Redis application. It works with any cloud provider as long as you run it on a host with network access to your cloud-based Redis server. It makes it easy to discover cloud databases and configure connection details with a single click. It allows you to automatically add Redis Enterprise Software and Redis Enterprise Cloud databases. + +[Follow this link](/explore/redisinsightv2/getting-started) to install RedisInsight v2 on your local system. +Assuming that you already have RedisInsight v2 installed on your MacOS, you can browse through the Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. -``` -$ pipenv graph -redis==4.0.2 -``` + +### Step 5. Add Redis database + +![access redisinsight](images/add_database.png) + +### Step 6. Enter Redis Enterprise Cloud details + +Add the Redis Enterprise cloud database endpoint, port and password. + + +![access redisinsight](images/database_creds.png) + + +### Step 7. Verify the database under RedisInsight dashboard + + +![database details](images/database_details.png) ## Storing JSON in Redis @@ -56,6 +76,25 @@ Let's consider a simple JSON document structure representing a user: } ``` +## Installing Redis + +``` + $ pip3 install redis +Collecting redis + Downloading redis-4.2.0-py3-none-any.whl (225 kB) +Collecting async-timeout>=4.0.2 + Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB) +Collecting typing-extensions + Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB) +.. + Requirement already satisfied: packaging>=20.4 in /usr/lib/python3.8/site-packages (from redis) (20.4) +Collecting wrapt<2,>=1.10 +Installing collected packages: async-timeout, typing-extensions, wrapt, deprecated, redis + Running setup.py install for wrapt ... done + Successfully installed async-timeout-4.0.2 deprecated-1.2.13 redis-4.2.0 typing-extensions-4.1.1 wrapt-1.14.0 +``` + + Here's the Python code to store this document in Redis using RedisJSON: ```python diff --git a/docs/howtos/redisjson/using-redisinsight/database_details.png b/docs/howtos/redisjson/using-redisinsight/database_details.png new file mode 100644 index 0000000000..5007a480b0 Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/database_details.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/image b/docs/howtos/redisjson/using-redisinsight/image new file mode 100644 index 0000000000..5007a480b0 Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/image differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/add_database.png b/docs/howtos/redisjson/using-redisinsight/images/add_database.png new file mode 100644 index 0000000000..9ada742a2f Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/add_database.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/database_creds.png b/docs/howtos/redisjson/using-redisinsight/images/database_creds.png new file mode 100644 index 0000000000..ef6379e72b Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/database_creds.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/database_details.png b/docs/howtos/redisjson/using-redisinsight/images/database_details.png new file mode 100644 index 0000000000..5007a480b0 Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/database_details.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/details_database.png b/docs/howtos/redisjson/using-redisinsight/images/details_database.png new file mode 100644 index 0000000000..3881cf0272 Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/details_database.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/json_0.png b/docs/howtos/redisjson/using-redisinsight/images/json_0.png new file mode 100644 index 0000000000..eccb549e7f Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/json_0.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/json_1.png b/docs/howtos/redisjson/using-redisinsight/images/json_1.png new file mode 100644 index 0000000000..d4e926ae3a Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/json_1.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/json_2.png b/docs/howtos/redisjson/using-redisinsight/images/json_2.png new file mode 100644 index 0000000000..e957377b83 Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/json_2.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/json_3.png b/docs/howtos/redisjson/using-redisinsight/images/json_3.png new file mode 100644 index 0000000000..45fd7b491a Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/json_3.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/images/select_cloud_vendor.png b/docs/howtos/redisjson/using-redisinsight/images/select_cloud_vendor.png new file mode 100644 index 0000000000..2526223c80 Binary files /dev/null and b/docs/howtos/redisjson/using-redisinsight/images/select_cloud_vendor.png differ diff --git a/docs/howtos/redisjson/using-redisinsight/index-usingredisinsight.mdx b/docs/howtos/redisjson/using-redisinsight/index-usingredisinsight.mdx index 690f6a8847..60929a7286 100644 --- a/docs/howtos/redisjson/using-redisinsight/index-usingredisinsight.mdx +++ b/docs/howtos/redisjson/using-redisinsight/index-usingredisinsight.mdx @@ -11,84 +11,88 @@ RedisInsight provides built-in support for the RedisJSON, RediSearch, RedisGraph Below steps shows how to get started with RedisJSON using RedisInsight: -### Step 1. Register and subscribe +### Step 1. Create a free Cloud account -Follow [this link to register](/create/cloud/rediscloud) and subscribe to Redis Enterprise Cloud +Create your free Redis Enterprise Cloud account. Once you click on β€œGet Started”, you will receive an email with a link to activate your account and complete your signup process. -![RedisJSON](redisjson3.png) +:::info TIP +For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise Cloud and try all the advanced capabilities! -### Step 2. Create a database with RedisJSON Module +:tada: [Click here to sign up](https://redis.com/try-free) -![RedisJSON](redisjson1.png) +::: +### Step 2. Create Your database -### Step 3. Download RedisInsight +Choose your preferred cloud vendor. Select the region and then click "Let's start free" to create your free database automatically. -To use RedisInsight on a local Mac, you can download from the RedisInsight page on the RedisLabs website: +:::info TIP +If you want to create a custom database with your preferred name and type of redis, +click "Create a custom database" option shown in the image. +::: -[Click this link](https://redis.com/redis-enterprise/redis-insight/#insight-form) to access a form that allows you to select the operating system of your choice. +![create database ](images/select_cloud_vendor.png) -![My Image](redisinsightmac.png) -Fill out the rest of the form and click β€œDownload.” Please note that the package name is the combination of the platform and version as shown here: +### Step 3. Verify the database details -redisinsight-platform-version +You will be provided with Public endpoint URL and "Redis Stack" as the type of database with the list of modules that comes by default. -### Step 4. Install RedisInsight -Click on the RedisInsight executable and install it in your system. -![My Image](redisinsight2.png) +![verify database](images/details_database.png) +### Step 4. Using RedisInsight -Head over to your web browser and go to http://localhost:8001 -Congratulations! You have successfully installed RedisInsight and are now ready to inspect your Redis data, monitor database health, and perform runtime server configuration with this browser-based management interface for your Redis deployment. +RedisInsight is a visual tool that lets you do both GUI- and CLI-based interactions with your Redis database, and so much more when developing your Redis based application. It is a fully-featured pure Desktop GUI client that provides capabilities to design, develop and optimize your Redis application. It works with any cloud provider as long as you run it on a host with network access to your cloud-based Redis server. It makes it easy to discover cloud databases and configure connection details with a single click. It allows you to automatically add Redis Enterprise Software and Redis Enterprise Cloud databases. -### Step 5. Connect to Redis database +[Follow this link](/explore/redisinsightv2/getting-started) to install RedisInsight v2 on your local system. +Assuming that you already have RedisInsight v2 installed on your MacOS, you can browse through the Applications and click "RedisInsight-v2" to bring up the Redis Desktop GUI tool. -![My Image](redisinsight3.png) -Assuming that you already have Redis database up and running, select "Connect to a Redis database" -![My Image](redisinsight4.png) +### Step 5. Add Redis database -### Step 6. Add Redis Database +![access redisinsight](images/add_database.png) -Enter the requested details, including Name, Host (endpoint), Port, and Password in the form, as shown below. You can skip username for now. Then click β€œADD REDIS DATABASE”: +### Step 6. Enter Redis Enterprise Cloud details +Add the Redis Enterprise cloud database endpoint, port and password. -### Step 7. Execute JSON queries +![access redisinsight](images/database_creds.png) + + +### Step 7. Verify the database under RedisInsight dashboard + + +![database details](images/database_details.png) + + +### Step 8. Execute JSON queries ```bash - JSON.SET employee_profile . '{ "employee": " { "name": "carol", "age": 40, "married": true } }' + JSON.SET employee_profile . '{ "employee": { "name": "carol", "age": 40, "married": true } }' ``` -![My Image](image_1_1.png) +![My Image](images/json_0.png) ### Step 8. Accessing RedisInsight Browser Tool Select "employee_profile" to display the JSON data -![My Image](image_1_2.png) +![My Image](images/json_1.png) ### Step 9. Add a new key -![My Image](image_1_3.png) +![My Image](images/json_2.png) ### Step 10. Expand the JSON field -![My Image](image_1_4.png) - - -### Step 11. Using RedisInsight Browser CLI - -![My Image](image_1_5.png) +![My Image](images/json_3.png) -### Step 12. Deleting the existing key -![My Image](image_1_6.png) ### References diff --git a/docs/howtos/redistimeseries/using-python/images/add_database.png b/docs/howtos/redistimeseries/using-python/images/add_database.png new file mode 100644 index 0000000000..9ada742a2f Binary files /dev/null and b/docs/howtos/redistimeseries/using-python/images/add_database.png differ diff --git a/docs/howtos/redistimeseries/using-python/images/database_creds.png b/docs/howtos/redistimeseries/using-python/images/database_creds.png new file mode 100644 index 0000000000..ef6379e72b Binary files /dev/null and b/docs/howtos/redistimeseries/using-python/images/database_creds.png differ diff --git a/docs/howtos/redistimeseries/using-python/images/database_details.png b/docs/howtos/redistimeseries/using-python/images/database_details.png new file mode 100644 index 0000000000..5007a480b0 Binary files /dev/null and b/docs/howtos/redistimeseries/using-python/images/database_details.png differ diff --git a/docs/howtos/redistimeseries/using-python/images/details_database.png b/docs/howtos/redistimeseries/using-python/images/details_database.png new file mode 100644 index 0000000000..3881cf0272 Binary files /dev/null and b/docs/howtos/redistimeseries/using-python/images/details_database.png differ diff --git a/docs/howtos/redistimeseries/using-python/images/select_cloud_vendor.png b/docs/howtos/redistimeseries/using-python/images/select_cloud_vendor.png new file mode 100644 index 0000000000..2526223c80 Binary files /dev/null and b/docs/howtos/redistimeseries/using-python/images/select_cloud_vendor.png differ diff --git a/docs/howtos/redistimeseries/using-python/index-usingpython.mdx b/docs/howtos/redistimeseries/using-python/index-usingpython.mdx index 9b61a99a04..02d60b2996 100644 --- a/docs/howtos/redistimeseries/using-python/index-usingpython.mdx +++ b/docs/howtos/redistimeseries/using-python/index-usingpython.mdx @@ -13,247 +13,82 @@ Time series data is a series of data stored in the time order (Example: Stock pe RedisTimeSeries is a Redis module that allows Redis to be used as a fast in-memory time series database designed to collect, manage, and deliver time series data at scale. The RedisTimeSeries module shares the performance and simplicity aspects of Redis. Under the hood, it uses efficient data structures such as Radix tree to index data by timestamp, which makes it extremely fast and efficient to run time-aggregate queries. -## RedisTimeSeries Python Client +## Python Client for RedisTimeSeries -The redistimeseries-py is a package that gives developers easy access to the RedisTimeSeries module. The package extends [redis-py](https://github.com/andymccurdy/redis-py)'s interface with RedisTimeSeries's API. +:::note TIP +As of redis-py 4.0.0, the redistimeseries-py library is deprecated. It's features have been merged into redis-py. Please either install it from pypy or the repo. +::: Follow the steps below to get started with RedisTimeSeries with Python: -### Step 1. Create a free Redis Enterprise cloud account -Create your free [Redis Enterprise Cloud account](https://redis.com/try-free/). Once you click on β€œGet Started”, you will receive an email with a link to activate your account and complete your signup process. +### Step 1. Create a free Cloud account +Create your free Redis Enterprise Cloud account. Once you click on β€œGet Started”, you will receive an email with a link to activate your account and complete your signup process. -![alt_text](images/image2.png "image_tooltip") +:::info TIP +For a limited time, use **TIGER200** to get **$200** credits on Redis Enterprise Cloud and try all the advanced capabilities! +:tada: [Click here to sign up](https://redis.com/try-free) -![alt_text](images/image3.png "image_tooltip") +::: +### Step 2. Create Your database +Choose your preferred cloud vendor. Select the region and then click "Let's start free" to create your free database automatically. -### Step 2. Create Your subscription +:::info TIP +If you want to create a custom database with your preferred name and type of redis, +click "Create a custom database" option shown in the image. +::: -Next, you will have to create a Redis Enterprise Cloud subscription. In the Redis Enterprise Cloud menu, click "Create your Subscription". +![create database ](images/select_cloud_vendor.png) +### Step 3. Verify the database details +You will be provided with Public endpoint URL and "Redis Stack" as the type of database with the list of modules that comes by default. -![alt_text](images/image4.png "image_tooltip") +![verify database](images/details_database.png) -### Step 3. Select the right Subscription Plan - -Select "Fixed Plan" for low throughout application as for now. - - -![alt_text](images/image5.png "image_tooltip") - - - -### Step 4. Select cloud vendor - -For the cloud provider, select your preferred cloud (for demo purpose) - - - - -![alt_text](images/image6.png "image_tooltip") - - - -### Step 5. Click "Create Subscription" - -Finally, click on the "Create Subscription" button. - - - - -![alt_text](images/image7.png "image_tooltip") - - -You can now verify the subscription as shown below: - - - -![alt_text](images/image8.png "image_tooltip") - - - -### Step 6. Create database - -Click "Create Database". Enter database name and your preferred module. - - -![alt_text](images/image9.png "image_tooltip") - - - -### Step 7.Installation +### Step 4.Installation ``` -$ pip install redistimeseries +$ pip install redis ``` -``` -Collecting redistimeseries - Downloading redistimeseries-1.4.3.tar.gz (8.1 kB) -Collecting hiredis>=0.2.0 - Downloading hiredis-2.0.0.tar.gz (75 kB) - |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 75 kB 4.1 MB/s -Collecting redis>=2.10 - Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB) - |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 72 kB 1.1 MB/s -Collecting rmtest>=0.2 - Downloading rmtest-0.7.0.tar.gz (6.8 kB) -Using legacy setup.py install for redistimeseries, since package 'wheel' is not installed. -Using legacy setup.py install for hiredis, since package 'wheel' is not installed. -Using legacy setup.py install for rmtest, since package 'wheel' is not installed. -Installing collected packages: hiredis, redis, rmtest, redistimeseries - Running setup.py install for hiredis ... done - Running setup.py install for rmtest ... done - Running setup.py install for redistimeseries ... done -Successfully installed hiredis-2.0.0 redis-3.5.3 redistimeseries-1.4.3 rmtest-0.7.0 -``` - -### Step 8. Create a script file -```bash - from redistimeseries.client import Client as RedisTimeSeries - import time - import sys - import site - import datetime - import random - - print(' \n '.join(sys.path)) - redis = RedisTimeSeries(host='redis-XXXX.c264.ap-south-1-1.ec2.cloud.redislabs.com', port=, password=) - # redis.flushdb() - key = 'temperature' - def create(key): - print('\n Create new time series: %s' % str(key)) - #redis.create(key,retentionSecs=30,labels={'sensor_id' : 2,'area_id' : 32}) - redis.create(key,retention_msecs=30000,labels={'sensor_id' : 2,'area_id' : 32}) - print('') - def store(key, interval): - print("\n Append new value to time series:\n") - begin_time = int(time.time()) - for i in range(interval): - timestamp = int(time.time()) - value = round(random.uniform(0.0,100.0),2) - timestamp_strftime = datetime.datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S') - sys.stdout.write(' %s : %.2f \n' % (timestamp_strftime, value)) - sys.stdout.flush() - #redis.add(key,timestamp,value,retentionSecs=30, labels={'sensor_id' : 2,'area_id' : 32}) - redis.add(key,timestamp,value,retention_msecs=30000, labels={'sensor_id' : 2,'area_id' : 32}) - time.sleep(1) - end_time = int(time.time()-1) - return (begin_time, end_time) - def query(key, begin_time, end_time): - begin_time_datetime = datetime.datetime.fromtimestamp(begin_time).strftime('%Y-%m-%d %H:%M:%S') - end_time_datetime = datetime.datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S') - print("\n Query time series in range:\n\n %s to %s \n" % (begin_time_datetime, end_time_datetime)) - try: - #for record in redis.range(key,begin_time, end_time,bucketSizeSeconds=1): - for record in redis.range(key,begin_time, end_time,bucket_size_msec=1000): - timestamp = datetime.datetime.fromtimestamp(record[0]).strftime('%Y-%m-%d %H:%M:%S') - value = round(float(record[1]),2) - print(' %s : %.2f ' % (timestamp,value)) - except Exception as e: - print("\n Error: %s" % e) - print('') - def print_info(): - print('\n Query time series info:\n') - for key in redis.keys('*'): - print(' key=%s' % (key.decode('utf8'))) - info = redis.info(key) - sensor = info.labels['sensor_id'] - print(" sensor_id=%s " % str(sensor)) - area = info.labels['area_id'] - print(" area_id=%s " % str(area)) - last_time_stamp_seconds = info.__dict__['lastTimeStamp'] - last_time_stamp = datetime.datetime.fromtimestamp(last_time_stamp_seconds).strftime('%Y-%m-%d %H:%M:%S') - print(" last_time_stamp=%s " % str(last_time_stamp)) - - print('') - - def print_loop(loops): - - for i in range(loops): - - if i == 0: - sys.stdout.write(' ') - - sys.stdout.write('.') - sys.stdout.flush() - time.sleep(1) - - print('') - - create(key) - interval = 10 - begin_time, end_time = store(key,interval) - time.sleep(1) - query(key,begin_time,end_time) - query(key,begin_time+4,end_time-5) - print_info() - print('\n Set expire key: %s' % str(key)) - redis.expire(key, (30)) - loops = 30 - print_loop(loops) - query(key,begin_time,end_time) - time.sleep(1) - interval = 1 - create(key) - begin_time, end_time = store(key,interval) - time.sleep(1) - query(key,begin_time,end_time) - time.sleep(1) - print('\n Delete key: %s' % str(key)) - redis.delete(key) - time.sleep(1) - - query(key,begin_time,end_time) - - print('') +### Step 5. Create a script file -``` + ```python + import redis + r = redis.Redis(host='redis-18386.c110.qa.us-east-1-1.ec2.qa-cloud.redislabs.com', port=, password=) + r.ts().create(2, retension_msecs=5) + ``` Save the above file with a name "ts.py". -### Step 9. Executing the python script +### Step 6. Executing the python script + + ```bash python3 ts.py ``` -### Step 10. Monitor the Redis database +### Step 7. Monitor the Redis database ``` -OK -1635487154.447976 [0 52.149.144.189:40066] "TS.CREATE" "temperature" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487199.379907 [0 52.149.144.189:40572] "AUTH" "9740535000" -1635487199.575906 [0 52.149.144.189:40572] "TS.CREATE" "temperature" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487199.775906 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487199" "59.85" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487200.975904 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487200" "61.88" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487202.175902 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487202" "90.04" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487203.375900 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487203" "35.47" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487204.575899 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487204" "60.43" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487205.775897 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487205" "45.16" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487206.975895 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487206" "32.69" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487208.175893 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487208" "48.51" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487209.379891 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487209" "27.56" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487210.579889 [0 52.149.144.189:40572] "TS.ADD" "temperature" "1635487210" "53.58" "RETENTION" "30000" "LABELS" "sensor_id" "2" "area_id" "32" -1635487212.779886 [0 52.149.144.189:40572] "TS.RANGE" "temperature" "1635487199" "1635487210" -1635487212.979886 [0 52.149.144.189:40572] "TS.RANGE" "temperature" "1635487203" "1635487205" + 1648389303.557366 [0 20.127.62.215:59768] "TS.CREATE" "2" ``` -You will see bunch of RedisTimeSeries specific commands(TS.ADD. TS.CREATE and TS.RANGE) as shown above. ## References