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
- ...
Related programs
Some programs is written in python or providing a python port. We can use this project to statistic their time:
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
Built Distribution
File details
Details for the file repl-python-wakatime-0.0.11.tar.gz
.
File metadata
- Download URL: repl-python-wakatime-0.0.11.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e809d7a8d372dfde0e578341a003258ebb63ed1aacb7def8396d0adf9043e41 |
|
MD5 | 88faef6da2f849f6b1fce3ed784db7a7 |
|
BLAKE2b-256 | 0d46267bc5fca0407c7292d4b940179e44d07a5fa5e512c8d9bcaabb4d62360a |
File details
Details for the file repl_python_wakatime-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: repl_python_wakatime-0.0.11-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff69598fb8976fff8b9bfb94d796d266ca07db923443a28c9566f04b31ba69f8 |
|
MD5 | 981730bde344513d5055f7df6e1d7cf8 |
|
BLAKE2b-256 | 50898e4ed7a583fc27d8dd596688a034564a5ad75e762a3a1e83bcbbd15eb5df |