repl-python-wakatime
Python REPL plugin for automatic time tracking and metrics generated from your programming activity.
REPLs
python
import sys
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.python import Python
sys.ps1 = Python(Wakatime())
ptpython
${XDG_CONFIG_HOME:-$HOME/.config}/ptpython/config.py:
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.ptpython import Ptpython
def configure(repl: PythonRepl) -> None:
repl.all_prompt_styles[repl.prompt_style] = Ptpython(
Wakatime(), repl.all_prompt_styles[repl.prompt_style]
)
ipython/ptipython
~/.ipython/profile_default/ipython_config.py:
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.ipython import Ipython
c.TerminalInteractiveShell.prompts_class = lambda *args, **kwargs: Ipython(
Wakatime(),
c.TerminalInteractiveShell.prompts_class(*args, **kwargs),
)
gdb
Your gdb must be compiled with
python port.
~/.config/gdb/gdbinit:
source ~/.config/gdb/gdbinit.py
~/.config/gdb/gdbinit.py:
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.gdb import StopHook
StopHook(Wakatime())
- bpython
- xonsh
- mypython: won't fix due to no any configuration.
- vim/neovim with python support: see vim-wakatime and code-stats.nvim
Hooks
You can use many hooks at the same time:
from repl_python_wakatime.backends.chainedhook import ChainedHook
from repl_python_wakatime.backends.codestats import CodeStats
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.python import Python
sys.ps1 = Python(ChainedHook(hooks=(Wakatime(), CodeStats())))
APIs
You can use this project to statistic the time of using any programs. Such as, translate-shell is a translating program:
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends import Repl
repl = Repl(Wakatime(language="translate-shell", category="translating"))
# after each translating
repl()
Similar projects
Metadata
Release files for repl-python-wakatime 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| repl_python_wakatime-0.1.6.tar.gz | 28.4 kB | Without provenance | Details for repl_python_wakatime-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| repl_python_wakatime-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for repl_python_wakatime-0.1.6-py3-none-any.whl |
Total release size: 51.6 kB
Release files / repl_python_wakatime-0.1.6.tar.gz
| Download URL | repl_python_wakatime-0.1.6.tar.gz |
|---|---|
| Size | 28.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fb7cd56434dcd8cd763ed612543b9924cf2e33c5f5854c96936ec7b6482c8b0
|
|
BLAKE2b-256 checksum How to use checksums |
4849e66a6cacc3844c99b3bc46377aca75cee92e95f933c257de32dbc4de8e95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / repl_python_wakatime-0.1.6-py3-none-any.whl
| Download URL | repl_python_wakatime-0.1.6-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81d3ec26a1d19dde61d4c7cf978941b91003a9caa92c9f5f4fe6dd578d6ac81f
|
|
BLAKE2b-256 checksum How to use checksums |
8df338a38645bac9ef4151ae8c7e52f14706810a33e0d1d2117b125f1b7f9e39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for repl-python-wakatime 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.