跳转到主要内容

Python REPL插件,用于自动跟踪编程活动并生成指标

项目描述

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插件,用于自动跟踪编程活动并生成指标。

screenshot

支持的REPL

from repl_python_wakatime.python import install_hook

install_hook()
  • ptpython:
    • 每次输出后执行 get_ptpython().get_output_prompt()
    • 配置文件: .../ptpython/config.py...取决于操作系统。
from ptpython.repl import PythonRepl
from repl_python_wakatime.ptpython import install_hook


def configure(repl: PythonRepl) -> None:
    install_hook(repl)
  • ipython:
    • 每次输出后都会执行 c.TerminalInteractiveShell.prompts_class(shell).out_prompt_tokens()
    • 配置文件:~/.ipython/profile_default/ipython_config.py
from repl_python_wakatime.iptpython import install_hook

install_hook(c)

install_hook() 必须在自定义提示字符串之后,最好放在文件末尾。

配置

from repl_python_wakatime.python import install_hook

install_hook(hook_function, args, kwargs)

将在每次输出/输入后执行 hook_function(*args, **kwargs)。其他 REPL 也类似。目前,hook_function 可以是

  • repl_python_wakatime.hooks.wakatime.wakatime_hook():默认。
  • repl_python_wakatime.hooks.codestats.codestats_hook():用于 codestats
  • 为其他类似项目创建钩子,例如

相关程序

一些程序是用 Python 编写的或提供 Python 版本。我们可以使用此项目来统计它们的时间

类似项目

项目详情


下载文件

下载您平台的文件。如果您不确定要选择哪个,请了解有关 安装软件包 的更多信息。

源分布

repl-python-wakatime-0.0.11.tar.gz (29.9 kB 查看哈希)

上传时间

构建分布

repl_python_wakatime-0.0.11-py3-none-any.whl (23.6 kB 查看哈希)

上传时间 Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面