Skip to content
Persistent Incremental Counter
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
incremental_counter
.gitignore
LICENSE.txt
README.md
setup.cfg
setup.py

README.md

incremental-counter

Persistent Incremental Counter based on a counter file.

>>> 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
You can’t perform that action at this time.