| Name | repl-python-wakatime JSON |
| Version |
0.1.6
JSON |
| download |
| home_page | None |
| Summary | Python REPL plugin for automatic time tracking and metrics generated from your programming activity |
| upload_time | 2025-10-09 06:34:09 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.11 |
| license | GPL v3 |
| keywords |
wakatime
plugin
python
ipython
ptpython
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# repl-python-wakatime
[](https://results.pre-commit.ci/latest/github/wakatime/repl-python-wakatime/main)
[](https://github.com/wakatime/repl-python-wakatime/actions)
[](https://codecov.io/gh/wakatime/repl-python-wakatime)
[](https://repl-python-wakatime.readthedocs.io)
[](https://github.com/wakatime/repl-python-wakatime/releases)
[](https://github.com/wakatime/repl-python-wakatime/releases/latest)
[](https://github.com/wakatime/repl-python-wakatime/issues)
[](https://github.com/wakatime/repl-python-wakatime/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/wakatime/repl-python-wakatime/pulls)
[](https://github.com/wakatime/repl-python-wakatime/pulls?q=is%3Apr+is%3Aclosed)
[](https://github.com/wakatime/repl-python-wakatime/discussions)
[](https://github.com/wakatime/repl-python-wakatime/milestones)
[](https://github.com/wakatime/repl-python-wakatime/network/members)
[](https://github.com/wakatime/repl-python-wakatime/stargazers)
[](https://github.com/wakatime/repl-python-wakatime/watchers)
[](https://github.com/wakatime/repl-python-wakatime/graphs/contributors)
[](https://github.com/wakatime/repl-python-wakatime/graphs/commit-activity)
[](https://github.com/wakatime/repl-python-wakatime/commits)
[](https://github.com/wakatime/repl-python-wakatime/releases/latest)
[](https://github.com/wakatime/repl-python-wakatime/blob/main/LICENSE)
[](https://github.com/wakatime/repl-python-wakatime)
[](https://github.com/wakatime/repl-python-wakatime)
[](https://github.com/wakatime/repl-python-wakatime)
[](https://github.com/wakatime/repl-python-wakatime)
[](https://github.com/wakatime/repl-python-wakatime)
[](https://github.com/wakatime/repl-python-wakatime)
[](https://pypi.org/project/repl-python-wakatime/#description)
[](https://pypi.org/project/repl-python-wakatime/#history)
[](https://pypi.org/project/repl-python-wakatime/#files)
[](https://pypi.org/project/repl-python-wakatime/#files)
[](https://pypi.org/project/repl-python-wakatime/#files)
[](https://pypi.org/project/repl-python-wakatime/#files)
Python REPL plugin for automatic time tracking and metrics generated from your
programming activity.

## REPLs
### [python](https://github.com/python/cpython)
[`$PYTHON_STARTUP`](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONSTARTUP):
```python
import sys
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.python import Python
sys.ps1 = Python(Wakatime())
```
### [ptpython](https://github.com/prompt-toolkit/ptpython)
`${XDG_CONFIG_HOME:-$HOME/.config}/ptpython/config.py`:
```python
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](https://github.com/ipython/ipython)/[ptipython](https://github.com/prompt-toolkit/ptpython)
`~/.ipython/profile_default/ipython_config.py`:
```python
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](https://sourceware.org/gdb/)
Your `gdb` must be compiled with
[python port](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Python.html).
`~/.config/gdb/gdbinit`:
```gdb
source ~/.config/gdb/gdbinit.py
```
`~/.config/gdb/gdbinit.py`:
```python
from repl_python_wakatime.backends.wakatime import Wakatime
from repl_python_wakatime.frontends.gdb import StopHook
StopHook(Wakatime())
```
- [ ] [bpython](https://github.com/bpython/bpython)
- [ ] [xonsh](https://github.com/xonsh/xonsh)
- [ ] [mypython](https://github.com/asmeurer/mypython): won't fix due to no any
configuration.
- [ ] vim/neovim with python support: see
[vim-wakatime](https://github.com/wakatime/vim-wakatime) and
[code-stats.nvim](https://github.com/Freed-Wu/code-stats.nvim)
## Hooks
- [x] [wakatime](https://wakatime.com/)
- [x] [codestats](https://codestats.net/)
- [ ] [codetime](https://codetime.dev/)
- [ ] [rescuetime](https://www.rescuetime.com/)
You can use many hooks at the same time:
```python
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](https://github.com/Freed-Wu/translate-shell/) is a translating
program:
```python
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
- [wakatime plugins for python and many shells](https://wakatime.com/terminal)
- [codestats plugins](https://codestats.net/plugins)
Raw data
{
"_id": null,
"home_page": null,
"name": "repl-python-wakatime",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "wakatime, plugin, python, ipython, ptpython",
"author": null,
"author_email": "Wu Zhenyu <wuzhenyu@ustc.edu>",
"download_url": "https://files.pythonhosted.org/packages/48/49/e66a6cacc3844c99b3bc46377aca75cee92e95f933c257de32dbc4de8e95/repl_python_wakatime-0.1.6.tar.gz",
"platform": null,
"description": "# repl-python-wakatime\n\n[](https://results.pre-commit.ci/latest/github/wakatime/repl-python-wakatime/main)\n[](https://github.com/wakatime/repl-python-wakatime/actions)\n[](https://codecov.io/gh/wakatime/repl-python-wakatime)\n[](https://repl-python-wakatime.readthedocs.io)\n\n[](https://github.com/wakatime/repl-python-wakatime/releases)\n[](https://github.com/wakatime/repl-python-wakatime/releases/latest)\n[](https://github.com/wakatime/repl-python-wakatime/issues)\n[](https://github.com/wakatime/repl-python-wakatime/issues?q=is%3Aissue+is%3Aclosed)\n[](https://github.com/wakatime/repl-python-wakatime/pulls)\n[](https://github.com/wakatime/repl-python-wakatime/pulls?q=is%3Apr+is%3Aclosed)\n[](https://github.com/wakatime/repl-python-wakatime/discussions)\n[](https://github.com/wakatime/repl-python-wakatime/milestones)\n[](https://github.com/wakatime/repl-python-wakatime/network/members)\n[](https://github.com/wakatime/repl-python-wakatime/stargazers)\n[](https://github.com/wakatime/repl-python-wakatime/watchers)\n[](https://github.com/wakatime/repl-python-wakatime/graphs/contributors)\n[](https://github.com/wakatime/repl-python-wakatime/graphs/commit-activity)\n[](https://github.com/wakatime/repl-python-wakatime/commits)\n[](https://github.com/wakatime/repl-python-wakatime/releases/latest)\n\n[](https://github.com/wakatime/repl-python-wakatime/blob/main/LICENSE)\n[](https://github.com/wakatime/repl-python-wakatime)\n[](https://github.com/wakatime/repl-python-wakatime)\n[](https://github.com/wakatime/repl-python-wakatime)\n[](https://github.com/wakatime/repl-python-wakatime)\n[](https://github.com/wakatime/repl-python-wakatime)\n[](https://github.com/wakatime/repl-python-wakatime)\n\n[](https://pypi.org/project/repl-python-wakatime/#description)\n[](https://pypi.org/project/repl-python-wakatime/#history)\n[](https://pypi.org/project/repl-python-wakatime/#files)\n[](https://pypi.org/project/repl-python-wakatime/#files)\n[](https://pypi.org/project/repl-python-wakatime/#files)\n[](https://pypi.org/project/repl-python-wakatime/#files)\n\nPython REPL plugin for automatic time tracking and metrics generated from your\nprogramming activity.\n\n\n\n## REPLs\n\n### [python](https://github.com/python/cpython)\n\n[`$PYTHON_STARTUP`](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONSTARTUP):\n\n```python\nimport sys\n\nfrom repl_python_wakatime.backends.wakatime import Wakatime\nfrom repl_python_wakatime.frontends.python import Python\n\nsys.ps1 = Python(Wakatime())\n```\n\n### [ptpython](https://github.com/prompt-toolkit/ptpython)\n\n`${XDG_CONFIG_HOME:-$HOME/.config}/ptpython/config.py`:\n\n```python\nfrom repl_python_wakatime.backends.wakatime import Wakatime\nfrom repl_python_wakatime.frontends.ptpython import Ptpython\n\n\ndef configure(repl: PythonRepl) -> None:\n repl.all_prompt_styles[repl.prompt_style] = Ptpython(\n Wakatime(), repl.all_prompt_styles[repl.prompt_style]\n )\n```\n\n### [ipython](https://github.com/ipython/ipython)/[ptipython](https://github.com/prompt-toolkit/ptpython)\n\n`~/.ipython/profile_default/ipython_config.py`:\n\n```python\nfrom repl_python_wakatime.backends.wakatime import Wakatime\nfrom repl_python_wakatime.frontends.ipython import Ipython\n\nc.TerminalInteractiveShell.prompts_class = lambda *args, **kwargs: Ipython(\n Wakatime(),\n c.TerminalInteractiveShell.prompts_class(*args, **kwargs),\n)\n```\n\n### [gdb](https://sourceware.org/gdb/)\n\nYour `gdb` must be compiled with\n[python port](https://sourceware.org/gdb/current/onlinedocs/gdb.html/Python.html).\n\n`~/.config/gdb/gdbinit`:\n\n```gdb\nsource ~/.config/gdb/gdbinit.py\n```\n\n`~/.config/gdb/gdbinit.py`:\n\n```python\nfrom repl_python_wakatime.backends.wakatime import Wakatime\nfrom repl_python_wakatime.frontends.gdb import StopHook\n\nStopHook(Wakatime())\n```\n\n- [ ] [bpython](https://github.com/bpython/bpython)\n- [ ] [xonsh](https://github.com/xonsh/xonsh)\n- [ ] [mypython](https://github.com/asmeurer/mypython): won't fix due to no any\n configuration.\n- [ ] vim/neovim with python support: see\n [vim-wakatime](https://github.com/wakatime/vim-wakatime) and\n [code-stats.nvim](https://github.com/Freed-Wu/code-stats.nvim)\n\n## Hooks\n\n- [x] [wakatime](https://wakatime.com/)\n- [x] [codestats](https://codestats.net/)\n- [ ] [codetime](https://codetime.dev/)\n- [ ] [rescuetime](https://www.rescuetime.com/)\n\nYou can use many hooks at the same time:\n\n```python\nfrom repl_python_wakatime.backends.chainedhook import ChainedHook\nfrom repl_python_wakatime.backends.codestats import CodeStats\nfrom repl_python_wakatime.backends.wakatime import Wakatime\nfrom repl_python_wakatime.frontends.python import Python\n\nsys.ps1 = Python(ChainedHook(hooks=(Wakatime(), CodeStats())))\n```\n\n## APIs\n\nYou can use this project to statistic the time of using any programs. Such as,\n[translate-shell](https://github.com/Freed-Wu/translate-shell/) is a translating\nprogram:\n\n```python\nfrom repl_python_wakatime.backends.wakatime import Wakatime\nfrom repl_python_wakatime.frontends import Repl\n\nrepl = Repl(Wakatime(language=\"translate-shell\", category=\"translating\"))\n# after each translating\nrepl()\n```\n\n## Similar projects\n\n- [wakatime plugins for python and many shells](https://wakatime.com/terminal)\n- [codestats plugins](https://codestats.net/plugins)\n",
"bugtrack_url": null,
"license": "GPL v3",
"summary": "Python REPL plugin for automatic time tracking and metrics generated from your programming activity",
"version": "0.1.6",
"project_urls": {
"Bug Report": "https://github.com/wakatime/repl-python-wakatime/issues",
"Download": "https://github.com/wakatime/repl-python-wakatime/releases",
"Homepage": "https://repl-python-wakatime.readthedocs.io",
"Source": "https://github.com/wakatime/repl-python-wakatime"
},
"split_keywords": [
"wakatime",
" plugin",
" python",
" ipython",
" ptpython"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8df338a38645bac9ef4151ae8c7e52f14706810a33e0d1d2117b125f1b7f9e39",
"md5": "28b9b5cae841d010923c72e6def76d7c",
"sha256": "81d3ec26a1d19dde61d4c7cf978941b91003a9caa92c9f5f4fe6dd578d6ac81f"
},
"downloads": -1,
"filename": "repl_python_wakatime-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "28b9b5cae841d010923c72e6def76d7c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 23140,
"upload_time": "2025-10-09T06:34:08",
"upload_time_iso_8601": "2025-10-09T06:34:08.226780Z",
"url": "https://files.pythonhosted.org/packages/8d/f3/38a38645bac9ef4151ae8c7e52f14706810a33e0d1d2117b125f1b7f9e39/repl_python_wakatime-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4849e66a6cacc3844c99b3bc46377aca75cee92e95f933c257de32dbc4de8e95",
"md5": "d31753ce28fa7043e74e2ec74fda3485",
"sha256": "5fb7cd56434dcd8cd763ed612543b9924cf2e33c5f5854c96936ec7b6482c8b0"
},
"downloads": -1,
"filename": "repl_python_wakatime-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "d31753ce28fa7043e74e2ec74fda3485",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 28446,
"upload_time": "2025-10-09T06:34:09",
"upload_time_iso_8601": "2025-10-09T06:34:09.223757Z",
"url": "https://files.pythonhosted.org/packages/48/49/e66a6cacc3844c99b3bc46377aca75cee92e95f933c257de32dbc4de8e95/repl_python_wakatime-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-09 06:34:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wakatime",
"github_project": "repl-python-wakatime",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "repl-python-wakatime"
}