Redis PY yog dab tsi?
Redis PY yog dab tsi?

Video: Redis PY yog dab tsi?

Video: Redis PY yog dab tsi?
Video: Xwm Kab Yog Dab Tsi?: Hmoob Nkag Siab Yuam Kev Tag Lawm 2024, Kaum ib hlis
Anonim

redis - py yog ib tug zoo-tsim Python tus neeg siv lub tsev qiv ntawv uas cia koj tham nrog ib Redis server ncaj qha los ntawm Python hu xov tooj: $ python -m pib install redis . Tom ntej no, xyuas kom meej tias koj Redis server tseem nce thiab khiav hauv keeb kwm yav dhau.

Cov lus nug tseem yog, Redis siv rau dab tsi?

* Taw qhia rau Redis . Redis yog qhov chaw qhib (BSD daim ntawv tso cai), hauv-nco cov ntaub ntawv qauv khw, siv li ib tug database, cache thiab lus broker. Nws txhawb nqa cov ntaub ntawv xws li cov hlua, hashes, cov npe, teeb tsa, txheeb cov lus nug nrog ntau yam queries, bitmaps, hyperloglogs, geospatial indexes nrog lub vojvoog queries thiab ntws.

Tsis tas li ntawd, Redis pipelining yog dab tsi? Redis Pipelining . Redis yog TCP server uas txhawb kev thov / teb raws tu qauv. Hauv Redis , ib qho kev thov ua tiav nyob rau hauv ob kauj ruam: Tus neeg siv yuav xa cov lus nug mus rau tus neeg rau zaub mov feem ntau hauv txoj kev thaiv rau cov lus teb rau cov neeg rau zaub mov. Lub server ua cov lus txib thiab xa cov lus teb rov qab rau tus neeg siv khoom.

Tsuas yog li ntawd, kuv yuav txuas rau Redis hauv Python li cas?

Txhawm rau siv Redis nrog Python koj yuav xav tau ib Python Redis tus neeg siv khoom.

Qhib kev sib txuas rau Redis Siv redis-py

  1. Hauv kab 4, tus tswv tsev yuav tsum tau teeb tsa rau koj lub database hostname lossis IP chaw nyob.
  2. Hauv kab 5, qhov chaw nres nkoj yuav tsum tau teem rau koj qhov chaw nres nkoj database.
  3. Hauv kab 6, lo lus zais yuav tsum tau teeb tsa rau koj cov ntaub ntawv tus password.

Kuv yuav khiav Redis li cas?

  1. Qhib koj qhov Command Prompt (ex: cmd.exe) thiab ntaus:> redis-server --service-start.
  2. Redis API yuav tsim lub neej ntawd Redis uas yog npaj los txais kev sib txuas ntawm chaw nres nkoj 6379. Tam sim no koj tuaj yeem txuas rau nws nrog cov ntaub ntawv redis-cli.exe. Nco tseg: Txhawm rau txuag thiab nres Redis database, ntaus: > redis-server kaw tseg.

Pom zoo: