Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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*
可以用一些uv或者其他的包管理工具来上传,这里只是一个示例,因为llm子模块的一些依赖支持不到Python3.7, 而Python又没有分子模块的版本支持的功能,所以没有用包管理工具,这里面其实llm子模块要求python大于3.8。
当前支持 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.