<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 導入epel源 ``` yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ``` ## 安裝Redis ``` yum -y install redis ``` ## 安裝 redis 模塊 ``` pip install redis ``` ## 基本命令 ### set(name, value, ex=None, px=None, nx=False, xx=False) * 設置值 * ex,過期時間(秒) * px,過期時間(毫秒) * nx,如果設置為True,則只有name不存在時,當前set操作才執行 * xx,如果設置為True,則只有name存在時,當前set操作才執行 ### setnx(name, value) * 設置值,只有name不存在時,執行設置操作(添加) ### setex(name, value, time) * 設置值,time,過期時間(數字秒 或 timedelta對象) ### psetex(name, time_ms, value) * 設置值,time_ms,過期時間(數字毫秒 或 timedelta對象) ### mset(args, *kwargs) * 批量設置值 ### mget(keys, *args) * 批量獲取值 ### getset(name, value) * 設置新值并獲取原值 ...... ## 簡單操作 ``` #!/usr/bin/env python #-*-coding:utf-8-*- import redis # 連接數據庫 #con_redis = redis.Redis(host='127.0.0.1', port=6379, decode_responses=True) # 直接連接 pool = redis.ConnectionPool(host='127.0.0.1',port=6379,decode_responses=True) con_redis = redis.Redis(connection_pool=pool) # 添加鍵值對 con_redis.set('name', 'yzbtdiy') # 查找值 print(con_redis['name']) print(con_redis.get('name')) # 查找類型 print(type(con_redis.get('name'))) ``` via:[使用python來操作redis用法詳解](https://www.jianshu.com/p/2639549bedc8)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看