Page 72 - Python Cơ Bản
P. 72

import redis




           r = redis.StrictRedis(host='localhost', port=6379,

           db=0)





                8LрG LMЖR PЖRL






          8LрG LMЖR GɨG PЖRL FɳRL XLšЬRK XVɱR чРM XšвRK VIHMW  :ɴ Hд





           import redis




           r = redis.StrictRedis(...)


           r.set('foo', 'bar')
           print r.get('foo')


           (HiӅn thӍ 'bar')





                4MTIPMRI





          4MTIPMRI Pɧ Oц XLYϼX чšвG HɽRK XVSRK XVšЬRK LвT FϰR QYРR


          XʆRK TIVJSVQERGI FЮM KШT RLMАY PЖRL ZɧS QШX VIUYIWX XLE]


          Zɳ QЦM PЖRL Pɧ QШX VIUYIWX RLš XLɺRK XLšЬRK  <IQ Zɴ Hд


          WEY чВ LMВY GɨGL Wм HдRK TMTIPMRI FЀRK  redis-py
   67   68   69   70   71   72   73   74   75   76   77