This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Sharded Counters for Google Appengine (GAE).

Project Description

Joe Gregorio originally posted about Sharded Counters for Google Appengine.

This is like a downloadable gist:

from sharc import Counter

assert not Counter('A').exists()

Counter('A', initial_value=5, shards=5)
assert Counter('A').exists()

Counter('A').increment()
Counter('A').decrement()
Counter('A') + 2
Counter('A') - 2

assert Counter('A') == 5

Counter('A').shards = 10

Counter('A').delete()   # .delete_async()
assert not Counter('A').exists()
  • Added decrement
  • Increment and decrement variable deltas (default=1)
  • Set initial value of the counter (default=0)
  • Set initial value of the num of shards (default=20)
  • Added delete()
Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sharc-0.1.0.zip (6.1 kB) Copy SHA256 Checksum SHA256 Source Mar 4, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting