Python Connect to Redis

Source: Internet
Author: User

1. Connect to Redis:

I marked the red place is the Redis IP address, we change to their own good, this keyword requires a string type, a password to specify the password, port and the development machine on the Redis port to be consistent, or will be reported 10061, the default port on the line, DB designated as 4,redis default has 16 libraries , Index=0 began. In fact, the Select 4 specifies the library, but not that Python does not implement the Select command. So you need to specify the db number yourself. This parameter, which is circled in the back, defaults to false, and the result returned is the string type.

  

Python Connect to Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.