Skip to content

UedaTakeyuki/incremental_counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Persistent Incremental Counter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages