Skip to main content

Code timers, profiling decorators. Performance measurement tools.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylib_timer-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylib_timer-0.1.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file pylib_timer-0.1.0.tar.gz.

File metadata

  • Download URL: pylib_timer-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pylib_timer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d10ebfbd6279224ef925449803b2f72d7e7891d95a60f5dbd26e5956368074d
MD5 7483e880da5b7ebf9d8a9e07b8edc5ed
BLAKE2b-256 4a1f99dcb0c8347da4cfb123c36fae5487561b07eb65095f45c30ab0bfdd960a

See more details on using hashes here.

File details

Details for the file pylib_timer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pylib_timer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pylib_timer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d0fe755a9d1bfa02b598536dc41958ed17fdec765f0ef2a220c60edf4dba472
MD5 968de936637cb82bb58f0cda8fac7b32
BLAKE2b-256 638d060217988f42465ab14f76085ca3a629f7d9410a18fed0f6505681d7c02d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page