pytimer
Code timers
Installation
pip install pytimer
💡 Usage Examples
Basic Operations
from pylib_timer import Timer, timeit
# Timer context manager
with Timer() as timer:
# Your code here
pass
print(f"Elapsed: {timer.elapsed} seconds")
# Time function execution
@timeit
def my_function():
# Your code here
pass
AI/ML Use Cases
from pylib_timer import Timer, timeit
# Time ML model training
with Timer() as timer:
model.train(training_data)
print(f"Training took {timer.elapsed:.2f} seconds")
# Profile prediction function
@timeit
def predict_batch(data):
return model.predict(data)
📚 API Reference
See package documentation for complete API reference.
🤖 AI Agent Friendly
This package is optimized for AI agents and code generation tools:
- Clear function names and signatures
- Comprehensive docstrings with examples
- Type hints for better IDE support
- Common use cases documented
- Zero dependencies for reliability
License
MIT
Release files for pylib-timer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylib_timer-0.1.0.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylib_timer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.1 kB
Release files / pylib_timer-0.1.0.tar.gz
| Download URL | pylib_timer-0.1.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d10ebfbd6279224ef925449803b2f72d7e7891d95a60f5dbd26e5956368074d
|
|
BLAKE2b-256 checksum How to use checksums |
4a1f99dcb0c8347da4cfb123c36fae5487561b07eb65095f45c30ab0bfdd960a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / pylib_timer-0.1.0-py3-none-any.whl
| Download URL | pylib_timer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d0fe755a9d1bfa02b598536dc41958ed17fdec765f0ef2a220c60edf4dba472
|
|
BLAKE2b-256 checksum How to use checksums |
638d060217988f42465ab14f76085ca3a629f7d9410a18fed0f6505681d7c02d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|