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.9.tar.gz
(29.6 kB
view hashes)
Built Distribution
Close
Hashes for repl-python-wakatime-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2576141f4a1de47237962bd31be959fc5c1f8041252fbe879e796ed4b942443 |
|
MD5 | 806496309d6b73a813b8c07733e3b594 |
|
BLAKE2b-256 | 0d8a2696a42ded1462c83e6c04e7b995c5fffe01b6213a29a98bb8a80eb7d4d8 |
Close
Hashes for repl_python_wakatime-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a261bbdb0321d1b20adc4b630e254b06ea8e3000cc8f1a027650e1d21aa61896 |
|
MD5 | 10365382f0b5b275efddf4f14de033f7 |
|
BLAKE2b-256 | 77375cbfa0237b51b17768940fcd667010164e5d5f58db670ea6bd2697661555 |