Skip to main content

Incremental Counter

Project description

incremental-counter

Incremental Counter

>>> from incremental_counter import Counter
>>> c = Counter("/tmp/counter.txt")
>>> c.current()
0
>>> c.inc()
1
>>> c.inc()
2
>>> c.reset()
0
>>> c.set(3)
3
>>> c.dec()
2
>>> c.dec()
1
>>> c.dec()
0
>>> c.dec()
0
>>> c.dec()
0

history

  • 0.1.1 2018.11.03 first version
  • 0.1.3 2018.11.07 remove redundant class

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

incremental_counter-0.1.3.tar.gz (1.7 kB view hashes)

Uploaded Source

Supported by

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