Skip to main content

ModelWhale Python SDK

Project description

mw-sdk-python

简介

mw-sdk-python 是一个用于与 Heywhale 平台交互的 Python SDK,旨在简化数据集的获取和管理。

安装

pip install mw-sdk-python

示例代码

以下是一个示例代码,展示了如何使用 mw-sdk-python 获取数据集的详细信息。

from mw_python_sdk import download_dir
download_dir("66b08ec9898e74a8232bb2d1")

环境变量

  • MW_TOKEN: 用于身份验证的令牌。如果未提供 token 参数,SDK 将使用此环境变量。
  • 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*

兼容问题

目前支持python3.7,注意一下几点:

  1. dataclass在3.7引入,3.6用不了。
  2. | 操作符Union的语法糖在3.9中不支持,3.10支持,所以不要使用这个语法糖。
  3. / 切分位置参数和关键字参数是3.8的,也不要用。

管理于类型的问题,Python的计划是:

PEP 585—Type Hinting Generics In Standard Collections started a multiyear process to improve the usability of generic type hints. We can summarize that process in four steps:

  1. Introduce from future import annotations in Python 3.7 to enable the use of standard library classes as generics with list[str] notation.
  2. Make that behavior the default in Python 3.9: list[str] now works without the future import.
  3. Deprecate all the redundant generic types from the typing module.10 Depreca‐ tion warnings will not be issued by the Python interpreter because type checkers should flag the deprecated types when the checked program targets Python 3.9 or newer.
  4. Remove those redundant generic types in the first version of Python released five years after Python 3.9. At the current cadence, that could be Python 3.14, a.k.a Python Pi.

所以从3.14开始是没有这些类型的module了,这个在之后是要考虑的东西。

许可证

MIT

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

mw_python_sdk-0.0.58.tar.gz (58.9 kB view details)

Uploaded Source

Built Distribution

mw_python_sdk-0.0.58-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file mw_python_sdk-0.0.58.tar.gz.

File metadata

  • Download URL: mw_python_sdk-0.0.58.tar.gz
  • Upload date:
  • Size: 58.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for mw_python_sdk-0.0.58.tar.gz
Algorithm Hash digest
SHA256 f1187dd7f6acaa072ed6a69d28b4445afaa81c895b21904b02d5417d28f377b3
MD5 01f390235eddf0d563c877091d2344af
BLAKE2b-256 f22ae1d33ed353385c9ed621acca007051b003402e9fd72c7dbdc7fcbe6d1b5e

See more details on using hashes here.

File details

Details for the file mw_python_sdk-0.0.58-py3-none-any.whl.

File metadata

File hashes

Hashes for mw_python_sdk-0.0.58-py3-none-any.whl
Algorithm Hash digest
SHA256 81081e8c5d0fc9ba1b6e35d7e8d1adb70d5f3212f4206cc7f9b4d1ad6b307419
MD5 56f07f7f2aecfde192aedfdbcb3ec869
BLAKE2b-256 1075dd7321160e4fa1b9e2929ec6fdb106960dfe8a4cf4d34447f201c392a697

See more details on using hashes here.

Supported by

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