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()
Metadata
Release files for sharc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sharc-0.1.0.zip | 6.1 kB | Without provenance | Details for sharc-0.1.0.zip |
Security for sharc 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.