Registry / database / fastcounter

fastcounter

JSON →
library1.2.0pypypi✓ verified 86d ago

A Python library providing fast, thread-safe counter implementations. Currently at version 1.2.0 with type hints added. Active development on GitHub.

pip install fastcounter
INSTALL
IMPORT
SIG · FASTCOUNTER
F
fastcounter
databasepythonv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FastWriteCounter
from fastcounter import FastWriteCounter
Main fast counter class for write-heavy workloads.
FastReadCounter
from fastcounter import FastReadCounter
Optimized for read-heavy workloads.

Create and use a FastWriteCounter.

from fastcounter import FastWriteCounter counter = FastWriteCounter() counter.increment() counter.add(5) print(counter.value())
Debug
Known issues
breakingVersion 1.2.0 added type hints; if you were relying on dynamic attribute access or duck typing, your code may break under strict type checkers.
fix
Update your code to match the type signatures. For example, `increment()` now returns `None` explicitly.
affects: >=1.2.0
deprecatedThe `Counter` base class (if exists) is deprecated in favor of `FastWriteCounter` and `FastReadCounter`.
fix
Replace `from fastcounter import Counter` with `from fastcounter import FastWriteCounter` (or FastReadCounter) and adjust usage accordingly.
affects: >=1.0.0
gotcha`FastReadCounter` does not support `increment()`; it only provides `value()`. Trying to call `increment()` will raise an AttributeError.
fix
Ensure you import the correct counter type: use `FastWriteCounter` for counting operations, `FastReadCounter` for read-only access.
affects: all
Errors
Common errors & fixes
AttributeError: 'FastReadCounter' object has no attribute 'increment'
Using FastReadCounter in a context where incrementing is needed.
fix
Replace `FastReadCounter` with `FastWriteCounter`.
ImportError: cannot import name 'Counter' from 'fastcounter'
The module was renamed or removed. There is no `Counter` in fastcounter.
fix
Use `from fastcounter import FastWriteCounter` or `FastReadCounter`.
Upgrade
Version history
1.2.0latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
12
Amazon
1
Google (search)
1
Resources
fastcounter — pip install fastcounter · libregistry