Skip to main content

JDCat local service (pip package) bundling sensitive_check_local and CLI entry

Project description

JDCat (pip package)

JDCat 提供一个命令行入口,包装并启动本地助手 FastAPI 服务(来自 sensitive-check-local 项目),不更改任何业务逻辑。

安装与使用

  • 构建(在仓库根目录):

    uv pip install -U build
    cd jdcat
    python -m build
    
  • 本地安装(开发验证):

    uv pip install .
    

    或使用 pip:

    python -m pip install .
    
  • 启动服务(二选一):

    # 方式1:命令入口
    jdcat start --port 17866 --host 127.0.0.1
    
    # 方式2:模块执行
    python -m jdcat start --port 17866 --host 127.0.0.1
    

说明

  • 本包仅提供 CLI 入口与打包配置,业务逻辑均由 sensitive-check-local 提供。
  • 入口会通过 uvicorn 启动 sensitive_check_local.api:app,默认监听 127.0.0.1:17866
  • 资源文件的打包策略在 pyproject.toml 中进行配置(package-data),确保 wheel 安装后可用。

运行要求

  • Python: 3.10 - 3.11
  • 依赖:fastapi、uvicorn、httpx、mitmproxy、PyYAML、rumps 等(详见 pyproject)

开源信息

  • 作者:Sensitive Check Team

停止服务

  • 命令行停止(推荐):

    jdcat stop --port 17866 --host 127.0.0.1
    
  • 模块方式停止(等效):

    python -m jdcat stop --port 17866 --host 127.0.0.1
    

说明:

  • 停止命令会向 http://127.0.0.1:17866/stop 发起 POST 请求,调用本地服务的停止接口 sensitive_check_local.api.stop() 实现优雅退出并恢复系统代理。

常见问题与排查

  • pip 命令不可用:

    • 现象:zsh: command not found: pip
    • 解决:使用 python -m pip(已在文档中统一建议)
      python -m pip install .
      
  • mitmdump 不存在:

  • 端口占用:

    • 现象:启动报错 port 17866 is already in use
    • 解决:指定其它端口,例如:
      jdcat start --port 18000
      
  • 版本号说明:

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

jdcat-1.0.0.tar.gz (70.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jdcat-1.0.0-py3-none-any.whl (77.9 kB view details)

Uploaded Python 3

File details

Details for the file jdcat-1.0.0.tar.gz.

File metadata

  • Download URL: jdcat-1.0.0.tar.gz
  • Upload date:
  • Size: 70.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for jdcat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3cdfdf14abe2773ecb3863080cdf2a58f58fe3b78de00143b1e0c77934884800
MD5 a264b24e0fe5b1db8ad86e4d946853fd
BLAKE2b-256 b3b092ad05f65c6760b6af3bd740f57e578042ec6d3930c7f3a0a6a52b9a889c

See more details on using hashes here.

File details

Details for the file jdcat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jdcat-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 77.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for jdcat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7ba6ce69e3f9f6cb6b4bc63054c07b0364d578dd776b06d85424922ebd0463d
MD5 0933824c43d4e4e01391326f7f7f3110
BLAKE2b-256 e6fefd31c61e5dfd71d7d452b57b93970246c74b8e17983b4a16c9851efa9ab2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page