Skip to main content

repl-python-wakatime

pre-commit.ci status github/workflow codecov readthedocs

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

pypi/status pypi/v pypi/downloads pypi/format pypi/implementation pypi/pyversions

Python REPL plugin for automatic time tracking and metrics generated from your programming activity.

screen

REPLs

python

$PYTHON_STARTUP:

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())

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)

Source distribution for repl-python-wakatime 0.1.6
File Size Uploaded
repl_python_wakatime-0.1.6.tar.gz 28.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for repl-python-wakatime 0.1.6
File Interpreter ABI Platform
repl_python_wakatime-0.1.6-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page