Seed Services HTTP API的命令行界面
项目描述
Seed Services HTTP API的命令行界面。
安装
使用以下方式安装
$ pip install --user seed-services-cli (--user option may not be necessary when running a virtual environment)
然后运行
$ seed-services-cli --help
并阅读使用说明。
配置
可以使用YAML文件传递配置。下面提供了一个示例
hub: api_url: http://hub.example.org/api/v1 token: TEMP identity_store: api_url: http://idstore.example.org/api/v1 token: TEMP2
然后运行以下命令来使用
$ seed-services-cli --conf=config.yaml command-to-run
查找身份
运行
$ seed-services-cli identity-search --help
以了解搜索的选项。
示例搜索
$ seed-services-cli identity-search --address_type msisdn --address +27001
获取身份详情
运行
$ seed-services-cli identity-get --identity uuid
以获取特定身份的详情并转换为json
身份上传
运行
$ seed-services-cli identity-import --help
以了解身份上传说明。
然后上传内容,创建CSV或JSON文件
$ seed-services-cli identity-import --csv filename.csv
在仓库路由中找到demo_import_identities.csv和.json以获取格式示例。
身份详情更新
此命令用于更新详情JSON字段中的值。
运行
$ seed-services-cli identity-details-update --help
以了解身份详情更新说明。
然后上传内容,创建JSON文件
$ seed-services-cli identity-details-update --json-file filename.json
在仓库路由中找到demo_identities_details_update.json以获取格式示例。
消息列表和上传
运行
$ seed-services-cli sbm-messagesets --help
以了解可用于上传的消息集。
运行
$ seed-services-cli sbm-messages-import --help
以了解消息上传说明。
然后上传内容,创建CSV或JSON文件
$ seed-services-cli sbm-messages-import --csv filename.csv
注意:要上传二进制内容,文件名应在binary_content字段中,并将为您上传。
要检索消息,请运行
$ seed-services-cli sbm-messages --help
提供了针对消息、消息集、语言和序列号的过滤器。
消息删除
运行
$ seed-services-cli sbm-messages-delete --help
了解如何删除消息。提供了针对消息、消息集、语言和序列号的过滤器。
以下示例将删除消息集1的所有消息和二进制文件
$ seed-services-cli sbm-messages-delete --messageset 1
注册上传到Hub
运行
$ seed-services-cli hub-registrations-import --help
了解注册上传说明。
然后上传内容,创建CSV或JSON文件
$ seed-services-cli hub-registrations-import --csv filename.csv
在仓库路由中找到demo_import_registration.csv以获取格式示例。
将用户添加到具有团队访问权限的认证中
运行
$ seed-services-cli auth-user-add --help
了解如何添加用户。然后添加到团队中。
运行
$ seed-services-cli auth-user-add-team --help
检查服务状态
运行
$ seed-services-cli ci-status
获取完整的服务状态运行时间信息。
生成用户令牌
运行
$ seed-services-cli ci-user-token-generate --help
了解如何确保用户为服务拥有正确的CI令牌。
开发
运行
$ pip install --editable .
测试
$ pip install -r requirements-dev.txt $ py.test seed_services_cli
报告问题
可以在GitHub问题跟踪器中提交问题。请不要使用问题跟踪器进行一般性支持查询。
发布说明
0.0.6 - 2016年8月17日 - 添加了认证和ci相关命令
0.0.5 - 2016年7月14日 - 修复了identity-import
对格式不正确的地址的漏洞
0.0.4 - 2016年6月29日 - 添加了hub-registrations-import
0.0.3 - 2016年6月29日 - 添加了identity-get
和identity-import
。
0.0.2 - 2016年6月28日 - 添加了sbm-messages-delete
。将短参数从m
重命名为ms
,用于sbm-messages
命令中的消息集,以保持一致性。
0.0.1 - 初次发布
项目详情
哈希 for seed_services_cli-0.0.13-py2.py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | f7b9b43f5f165350368e7003ad41a43a38c6753d0d841bdfccb9aa7829e6a5e5 |
|
MD5 | 9713a383696eb9650870a77c1612ffca |
|
BLAKE2b-256 | 584dc3a43ccc6d1194684483f501c61e1a0f4a15dc07190a63c4c2e3004f1337 |