Skip to main content

se_alicli

Python 3.10+。安装:pip install .,或 pip install dist/se_alicli-0.1.0-py3-none-any.whl。 尚未发布 PyPI;不要假设 pip install se-alicli 已可用。

se_alicli login 登录,兼容 ~/.se_ossutil/config;旧版 shell、cli、upload、download 命令保留。 新接口支持 OSS_ACCESS_KEY_ID / OSS_ACCESS_KEY_SECRET(也支持 ALIBABA_CLOUD_ACCESS_KEY_ID/SECRET)。 默认地域 cn-wulanchabu、Bucket ali-pai-oss-seene,可用 ALIBABA_CLOUD_REGION_ID、OSS_BUCKET、OSS_ENDPOINT 覆盖。 PAI_WORKSPACE_ID 可选,限制资源查询范围。认证信息只在 Python 侧读取。

se_alicli --version
se_alicli call system.health </dev/null
se_alicli call dsw.list </dev/null
se_alicli call ram.list </dev/null
printf '%s' '{"prefix":"seen-e-model/"}' | se_alicli call oss.list
printf '%s' '{"id":"dsw-xxx"}' | se_alicli call dsw.metrics

call METHOD 从 stdin 读取 params JSON。修改方法先返回 preview 和 digest,重复同一输入并加 --apply DIGEST 才执行。Electron 使用 rpc,输入格式: {"version":1,"method":"oss.list","params":{"prefix":""}}。 stdout 只有一个 JSON envelope,stderr 为兼容传输日志。业务失败返回非零退出码和结构化错误。

方法:system.health/config;oss.list/mkdir/delete/upload/download/policy;ram.list/membership; dsw.list/detail/metrics/gpu/gpu_batch/quotas/network/lifecycle。列表 OSS 返回 cursor,其他资源自动分页。 RAM membership 参数 user/group/operation(add|remove),沿用原有用户组,不自动修改用户已有其他权限。 OSS policy 参数 user/prefix/mode(read|write|revoke),在当前 Bucket 中特调目录权限; revoke 仅移除精确匹配的特调条目,不撤销已有全局和用户组授权。 DSW network 参数 id/name/port/access(intranet|internet)/enabled/public_key,公网另需 nat_gateway/eip/external_port。 公网使用已有资源,不创建 NAT 或 EIP。返回 submitted 表示云端仍可能异步生效。

权限以 AccessKey 的实际云端权限为准,没有应用内超级管理员角色。 配额统计与 GPU 利用率是两套数据;无监控数据不能解释为 0% 利用率。

移植来源:用户本地 /home/se/oss_manage/se_ossutil v0.2.3,保留在 se_alicli.legacy,无需安装旧包。

当前账号基本信息

运行 se_alicli whoami,无需参数或 stdin。结构化接口为 account.me,例如 se_alicli call account.me </dev/null。桌面端点击左下角账号即可查看与刷新。

返回 STS 确认的身份类型、账号 ID、用户/主体 ID、ARN;RAM 用户还会查询显示名、创建时间与所属组。 RAM 查询失败时仍返回已验证身份,warnings 标明不可读的资料;groups: null 表示未知,[] 表示未加入用户组。 context 是本地连接配置,单独展示,不当作已验证身份或有效权限。响应不包含 AccessKey 或 Secret。

依据:GetCallerIdentity。

单卡 GPU 当前占用率

dsw.gpu 接收实例 id,返回每张卡的 gpu、pod、utilization(百分比)、 sampled_at(Unix 秒)及 stale。使用 CARD_GPU_DUTY_CYCLE, 取最近 5 分钟、60 秒粒度的最新单卡采样;超过 3 分钟标为过期。 空数据不会转换为 0%,权限错误独立返回。桌面开发机列表每轮完成后 60 秒刷新, 离开页面停止轮询,监控不占用前台操作额度。

桌面使用 dsw.gpu_batch:参数 instances 是 JSON 字符串,包含最多 4 个 {id, workspace}(来自已有开发机列表)。批内只查询一次 STS 身份,四路读取监控, 不重复读取每台实例详情;仍使用当前凭据向云端鉴权。返回 readings 按实例 ID 索引, 单台失败独立返回 error。桌面最多并行两批,并逐批更新;未缓存凭据或跨账号复用身份。

依据:GetMetrics 及云监控 DescribeMetricMetaList(Namespace=acs_pai_dsw) 的卡维度指标定义。

用户的 OSS 目录授权展示

ram.list 返回每个用户的 oss_grants 与 oss_statements,从当前 Bucket Policy 一次读取后按用户 ID 匹配;保留资源范围、动作、Effect、条件及策略来源。 约定团队目录仍由组名与用户名推算,不代表完整的实际授权。 oss_grants: null 表示策略不可读,顶层 warnings 给出原因;空数组表示未匹配到条目。 这是 Bucket Policy 条目的只读展示,不是合并所有 RAM、用户组、ACL 和条件后的有效权限模拟。 参考:Bucket Policy。

Metadata

Release files for se-alicli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for se-alicli 0.1.0
File Size Uploaded Provenance Actions
se_alicli-0.1.0.tar.gz 53.0 kB Without provenance Details for se_alicli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for se-alicli 0.1.0
File Interpreter ABI Platform Actions
se_alicli-0.1.0-py3-none-any.whl Python 3 none any Details for se_alicli-0.1.0-py3-none-any.whl

Total release size: 103.3 kB

Release files / se_alicli-0.1.0.tar.gz

Download URL se_alicli-0.1.0.tar.gz
Size 53.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9bea709f51216407f4416a68660da4f21da793cb559348366bb640f14bce461b
BLAKE2b-256 checksum
How to use checksums
069de6aa962ccea9e16233c40fde674948f5fe34b1f7a48f6a3cf4e41fdf5a80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / se_alicli-0.1.0-py3-none-any.whl

Download URL se_alicli-0.1.0-py3-none-any.whl
Size 50.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9340f69566c82b218c707f488ac685800252d66a54f1066d6ae1e600cb451f95
BLAKE2b-256 checksum
How to use checksums
46ffdbc9f5eb062305ca92fbd5549ea997a47d7b491229714696a5d6efe05776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for se-alicli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page