Skip to main content

a tiny and smart redis data structure wrapper of honey project based on Python

Project description

使用方式

from honeycomb import Dict, Counter, HoneyCache, cache_it, cache_it_json, SortedSet, List

if __name__ == '__main__':
import time
#排序set
s = SortedSet(key='testing')
for i in range(10):
s.add(i, int(time.time()))

#升序
for i in s.chunk(10, 5, last=True):
print i

c = Counter(key='like')
c.incr('shop_item_1')
c.keys() # or c.items()

d = Dcit(key='like')
d['user_id'] = {'click': '1'}

d.items() # or d.popitem()

@cache_it(limit=100, expire=60 * 60, namespace="user_like")
def testCacheBean(n):
print 'Cache for namespace: ', n
return [i for i in range(n)]

testCacheBean(10)

# list

ls = List(key='test_ls')
ls.append(1)
print ls[0]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

honeycomb-0.2.0.tar.gz (13.6 kB view details)

Uploaded Source

File details

Details for the file honeycomb-0.2.0.tar.gz.

File metadata

  • Download URL: honeycomb-0.2.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for honeycomb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7292cc7878a247e14179a27875a2d22ef71c513ba3f80d38e4a3ce07fc14df1f
MD5 2c9b72b58a37219086c0579f01e4d85d
BLAKE2b-256 43adbcab699a09ae05db85264727c27ac20fef94441a6cf10f531815208666be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page