Skip to main content

CounterAJM

A basic Python counter class for simple incrementing and value tracking.

Installation

pip install CounterAJM

Usage

from CounterAJM import Counter

# Initialize a counter
c = Counter(start=0, counter_name="MyCounter")

# Increment the counter
c.increment(5)
print(c.value)  # Output: 5

# String representation
print(c)  # Output: 5 (formatted)
print(repr(c))  # Output: MyCounter: 5

# Reset counter (using deleter)
del c.value
print(c.value)  # Output: 0

Features

  • Custom Start Value: Initialize the counter at any integer.
  • Counter Naming: Assign a name to your counter for better logging/representation.
  • Safe Incrementing: Prevents negative increments and non-integer values.
  • Easy Reset: Use del counter.value to reset the count to 0.
  • Formatted Output: Built-in __str__ and __repr__ for clean display.

License

MIT License

Metadata

Release files for CounterAJM 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CounterAJM 0.1.1
File Size Uploaded
counterajm-0.1.1.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CounterAJM 0.1.1
File Interpreter ABI Platform
counterajm-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / counterajm-0.1.1.tar.gz

Download URL counterajm-0.1.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0a1784c1bc078d9a48551b3d726e0173a6528d16b6764aa9cffe0eb15e12d712
BLAKE2b-256 checksum
How to use checksums
6a9f3e8123ee0a75b0a2d1e8f729d0a7d4a8b2d4e05b64b007e8b1ed619bad3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / counterajm-0.1.1-py3-none-any.whl

Download URL counterajm-0.1.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b62d0e917abb1ccc7495da5cd679d068807b4b7fd590f5e9da18be278497f3ff
BLAKE2b-256 checksum
How to use checksums
a7fac288b4f7513b8b2985b15cbcff9f5893ea3fff39861196eea3e039924f8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page