Giter Site home page Giter Site logo

narayanadithya / ru202 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redislabs-training/ru202

0.0 0.0 0.0 46 KB

Source code for the RU202 Redis Streams Course

Home Page: https://university.redis.com/courses/ru202/

License: MIT License

Python 99.76% Shell 0.24%

ru202's Introduction

RU202 Redis Streams

This repository contains the source code for the RU202 Redis Streams Course at Redis University. These materials can be accessed by installing them locally on your machine, or through Docker.

Optional Docker Environment

You access these materials through a self-contained Docker lab environment including an IDE and Redis install that we have setup for you:

$ docker run --rm --name redis-lab -p:8888:8888 redisuniversity/ru202-lab

Once the container is up and running, simply point your browser at http://localhost:8888/entry.html to access the IDE, terminal sessions and Redis. The source code is pre-installed, and the Python environment is setup for you.

Local Installation

You may prefer to setup an environment for this course on your local machine.

Prerequisites

(If you are using our Docker container, skip this section).

In order to run the sample code, you will need:

  • Python 3
  • Ability to run the pip command for Python 3
  • Access to a local or remote installation of Redis version 5 or newer (local preferred)

If you're using Windows, check out the following resources for help with running Redis:

Setup

(If you are using our Docker container, skip this section).

Execute these commands in your shell to clone the repository then create a Python virtual environment and install depdendencies:

$ git clone https://github.com/redislabs-training/ru202.git
$ cd ru202
$ python3 -m venv env
$ . env/bin/activate
$ pip install -r requirements.txt

Note: Ensure you activate your virtual environment before running any of the sample code.

Configuration

(If you are using our Docker container, skip this section).

By default, the code will assume that Redis is available on localhost at port 6379. If your Redis instance is running elsewhere, you will need to set the REDIS_HOST and/or REDIS_PORT environment variables. For example, here's how to configure these to connect to Redis on myredishostname port 6380:

$ export REDIS_HOST=myredishostname
$ export REDIS_PORT=6380

If your Redis instance requires a password to connect, also set the REDIS_PASSWORD environment variable:

$ export REDIS_PASSWORD=secret123

If you are using Redis 6 and need to supply a user name when connecting, you should set the REDIS_USER environment variable:

$ export REDIS_USER=student

Test Your Connection to Redis

To test your Redis connection and Python environment, run:

$ python test_connection.py

If this command outputs True, then you are setup and ready to run the example code as described in the course materials.

Questions?

If you have questions about this repository, you can chat with our teaching assistants on the Redis University Discord Server.

Subscribe to our YouTube Channel

We'd love for you to check out our YouTube channel, and subscribe if you want to see more Redis videos!

ru202's People

Contributors

narayanadithya avatar simonprickett avatar suzeshardlow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.