what is the purpose of db=0 when connecting to redis server in python?

Vikash Singh

In the redis python client documentation most examples have db=0 passed in constructor parameters. https://pypi.python.org/pypi/redis

What is the use of db=0 and in what case should i use other values instead of 0?

import redis

redis_client = redis.Redis(host='localhost', port=6379, db=0)
piRSquared

There are 16 databases that a redis server starts up with. They are labeled 0-15. If you chose to and organized your data accordingly, you could manipulate data in each of these. When connecting, you need to choose one. The default choice is db=0. However, it could have been any number in the range 0-15.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

what is the purpose of db=0 when connecting to redis server in python?

From Dev

what the cause of exception when connecting to the server

From Dev

redis-python db=0 parameter used for?

From Dev

What is the purpose of bitshifting by 0

From Dev

Connecting to Redis server with NSStream in Swift

From Dev

Difficulty in connecting Lua to redis server

From Dev

227 Entering Passive Mode (0,0,0,0,...) when connecting to vsftpd FTP server

From Dev

Error connecting to local db server

From Dev

What's the purpose of varchar(0)

From Dev

What is the purpose of "x = x || 0"?

From Dev

What's the purpose of varchar(0)

From Dev

What is the purpose of array[index] = 0;?

From Dev

What is the purpose of ASSEMBLIES in SQL Server?

From Dev

Login failed for user '' when connecting to SQL Server using Python

From Dev

Connecting Python to a Heroku PostgreSQL DB?

From Dev

Connecting Python to a Heroku PostgreSQL DB?

From Dev

mongodump error connecting to db server in localhost

From Dev

Data usage when connecting to the server

From Java

What is the purpose of meshgrid in Python / NumPy?

From Dev

What is the purpose of a context manager in python

From Dev

What is the purpose of compares in indices in Python?

From Java

What is the purpose of an 'if (0)' block in if-else block?

From Dev

What is the purpose of "ts & 0xffff0000"?

From Dev

What is the purpose of the octal digit 0 permission

From Dev

What is the purpose of appending "(0)" to this closure function?

From Dev

What is the purpose of BASH_ARGV0 in bash?

From Dev

Connecting from Python to SQL Server

From Dev

Connecting to Remote MongoDB Server with Python

From Dev

Connecting SQL Server on Docker to Python

Related Related

HotTag

Archive