Skip to main content

Python REPL plugin for automatic time tracking and metrics generated from your programming activity

Project description

repl-python-wakatime

pre-commit.ci status github/workflow codecov readthedocs

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

pypi/status pypi/v pypi/downloads pypi/format pypi/implementation pypi/pyversions

Python REPL plugin for automatic time tracking and metrics generated from your programming activity.

screenshot

Supported REPLs:

from repl_python_wakatime.python import install_hook

install_hook()
  • ptpython:
    • executes get_ptpython().get_output_prompt() after every output.
    • configure file: .../ptpython/config.py. ... depends on OS.
from ptpython.repl import PythonRepl
from repl_python_wakatime.ptpython import install_hook


def configure(repl: PythonRepl) -> None:
    install_hook(repl)
  • ipython:
    • executes c.TerminalInteractiveShell.prompts_class(shell).out_prompt_tokens() after every output.
    • configure file: ~/.ipython/profile_default/ipython_config.py.
from repl_python_wakatime.iptpython import install_hook

install_hook(c)

Your gdb must be compiled with python port.

~/.config/gdb/gdbinit:

source /the/path/of/repl_python_wakatime/gdb.py

See GDB Hooks to know more.

Use environment variables HOOK_NAMES=hook1:hook2 to defines which hook will be used.

install_hook() must be after the customization of the prompt string and best at the end of file.

Configure

from repl_python_wakatime.python import install_hook

install_hook(hook_function, args, kwargs)

will execute hook_function(*args, **kwargs) after every output/input. Other REPLs are similar. Currently, hook_function can be:

  • repl_python_wakatime.hooks.wakatime.wakatime_hook(): By default.
  • repl_python_wakatime.hooks.codestats.codestats_hook(): for codestats
  • Create your hooks for other similar projects, such as:

Similar projects

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

repl_python_wakatime-0.0.12.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

repl_python_wakatime-0.0.12-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file repl_python_wakatime-0.0.12.tar.gz.

File metadata

  • Download URL: repl_python_wakatime-0.0.12.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for repl_python_wakatime-0.0.12.tar.gz
Algorithm Hash digest
SHA256 539920e066df8721e7a350cd6c5d6e39f1ce8e00acb587720e0bf0117aa70998
MD5 32500c9841afe6839d615bf64f8a90da
BLAKE2b-256 382950dbc4de64610b3cbcd412c66c00bb92eb229f5c4d5a85457547f478f57f

See more details on using hashes here.

File details

Details for the file repl_python_wakatime-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for repl_python_wakatime-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 f2088e1cf2ca4382ef64d91498776deda0d6e8697cc5550460b855ed5917f1ba
MD5 39cf8694fdf37b2acd6811b2c17560b5
BLAKE2b-256 26bdac3ad67e15f00e25c237c0b02be25ce746aa4add84ed4717e060819971ab

See more details on using hashes here.

Supported by

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