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.8.tar.gz
(29.6 kB
view hashes)
Built Distribution
Close
Hashes for repl-python-wakatime-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 713a52cb1ce6294d34e7216b1e57a37ddab0d9ad38064af4e7859d0f17ca60bc |
|
MD5 | b7dc49f2b463857f300f1e38f110e30b |
|
BLAKE2b-256 | 88806e112898c848f640095d01b1ba0e0f1cb0dcdac4f4acc8f918cdc4d0240a |
Close
Hashes for repl_python_wakatime-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3838ae6065e37f31a310882db2c8e66758911e7a89da6a82c559371b00fc8212 |
|
MD5 | 51a7a3b00f2e1a429338a2bbac8648b9 |
|
BLAKE2b-256 | b7a865126704e6db6d6cce32480f472d564fb0f99fa316ea72fc1d89583fa2d0 |