Skip to main content

Intellif ArcternWeb SDK.

Project description

Intellif ArcternWeb SDK

Intellif ArcternWeb 官方 Python 开发包。 一个 Client 对象即可完成推理任务、模型组查询等常见操作,无需手写 HTTP 请求。

arcternweb_sdk/
├─ pyproject.toml
├─ requirements.txt
├─ src/arcternweb/
│   ├─ client.py
│   ├─ exceptions.py
│   ├─ models/…
│   ├─ services/…
│   └─ utils/…
└─ tests/

💻 安装

# PyPI 安装
pip install intellif-arcternweb
# 运行环境:Python ≥ 3.9

🚀 快速上手

import json
from pathlib import Path
from arcternweb import Client

BASE  = "http://192.168.99.63:30026"
TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJYLXVpZCI6MTQ3LCJleHAiOjIzODYzMDgxOTgsImlhdCI6MTc1NTU4ODE5OH0.ZRnHmTmbwvxdrvhX4qZfPqSCafvNf3I-JduQ7EEBHnI"   # 或设置环境变量:export ARCTERNWEB_TOKEN=...

client = Client(base_url=BASE_URL, token=TOKEN)
# arcternweb 上的测试 ID
infer_task_id = 13447
try:
    infer_task_info = client.infer_task_server.get(infer_task_id)
    print(infer_task_info)

    # 此处的 bin_name 将作为后续的模型名字使用
    bin_name = Path(infer_task_info.result_path).stem
    print("bin_name: ", bin_name)
except Exception as e:
    print(f"infer_task_server error: {e}")

🌍 环境变量

变量 作用 默认值
ARCTERNWEB_TOKEN API 鉴权 Token(可不在 Client 中显式传入)

📦 打包 & 发布

项目采用 PEP 517 / pyproject.toml 构建规范。

# 1️⃣ 构建 wheel / sdist
python3 -m pip install --upgrade build
python3 -m build                 # 生成 dist/*.whl dist/*.tar.gz

# 2️⃣ 本地验证
pip3 install --force-reinstall dist/*.whl
python3 -c "import arcternweb, sys; print('SDK 版本:', arcternweb.__version__)"

# 3️⃣ 发布到 PyPI 或私有仓库
python3 -m pip install --upgrade twine
twine upload dist/*

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

intellif_arcternweb-0.0.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

intellif_arcternweb-0.0.1-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file intellif_arcternweb-0.0.1.tar.gz.

File metadata

  • Download URL: intellif_arcternweb-0.0.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for intellif_arcternweb-0.0.1.tar.gz
Algorithm Hash digest
SHA256 547f04e1b40a0b3954a7e3ef914497aaa11fbbf1ed609e61a5e6f4d79222b5e7
MD5 08cd8e443a782067a9e2bcfcf1cd6b0a
BLAKE2b-256 276a8106213f92fd6430ae21b7286bfe09f7ec635efdd6a381590c059eeb5eee

See more details on using hashes here.

File details

Details for the file intellif_arcternweb-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for intellif_arcternweb-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3cb69b174e1ca7a51385ffba74c651f1bb178aeebb3e70f0f5535f3b65029a54
MD5 c7b0bf5c6df6571ee3dfc29154698380
BLAKE2b-256 79d781e689d3f0c30b677edc7c235d6042d826339c181541a374a97f421adc13

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