Python REPL plugin for automatic time tracking and metrics generated from your programming activity
Project description
repl-python-wakatime
Python REPL plugin for automatic time tracking and metrics generated from your programming activity.
Supported REPLs:
- python:
- executes
str(sys.ps1)
after every input. - configure file:
$PYTHON_STARTUP
.
- executes
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.
- executes
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
.
- executes
from repl_python_wakatime.iptpython import install_hook
install_hook(c)
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:
- codetime
- rescuetime
- ...
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.7.tar.gz
(29.6 kB
view hashes)
Built Distribution
Close
Hashes for repl-python-wakatime-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 865299abcd18c526104335d86280de38e0020825504660d2c4e9ddba9ef4e22d |
|
MD5 | 026fd128c0efb75e63645ccf2ba02f43 |
|
BLAKE2b-256 | 53b934ec8ce65bb4d54030c9f90737172c8ba2973debc3e2b69c92512120c326 |
Close
Hashes for repl_python_wakatime-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95fd881f777d70de324ad7f7ed39223461d7aed5941848bc258af71c38adda49 |
|
MD5 | 1344e16622ef54aab3efdb437d012dcc |
|
BLAKE2b-256 | 37634c12a25e289683c387df32823522b66d3f99de60d78c26d420a271d8f30e |