Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
mw-sdk-python
是一个用于与 Heywhale 平台交互的 Python SDK,提供了简单易用的接口来管理和获取数据集。
pip install mw-sdk-python
下面是一个简单示例,展示如何使用 SDK 根据数据集ID下载数据集:
from mw_python_sdk import download_dir
download_dir("66b08ec9898e74a8232bb2d1")
SDK 支持以下环境变量配置:
MW_TOKEN
: 身份验证令牌。若代码中未直接提供 token 参数,将使用此环境变量的值HEYWHALE_HOST
: Heywhale 平台地址(可选),默认为 https://www.heywhale.com
# 基础安装
pip install -e .
# 安装 LLM 相关功能(可选)
pip install -e '.[llm]'
以 0.1.0 版本为例:
python -m build
python -m twine upload dist/mw_python_sdk-0.1.0*
当前支持 Python 3.7 及以上版本。开发时需注意以下限制:
dataclass
装饰器仅支持 Python 3.7+|
语法糖仅支持 Python 3.10+,请使用传统写法/
仅支持 Python 3.8+,请避免使用根据 PEP 585,Python 的类型注解系统正在经历以下演进:
from __future__ import annotations
,支持 list[str]
形式的标准库泛型注解list[str]
语法,无需 future import请在开发时考虑上述变化,合理使用类型注解。
FAQs
ModelWhale Python SDK
We found that mw-python-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.