跳转到主要内容

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-getidentity-import

0.0.2 - 2016年6月28日 - 添加了sbm-messages-delete。将短参数从m重命名为ms,用于sbm-messages命令中的消息集,以保持一致性。

0.0.1 - 初次发布

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

seed-services-cli-0.0.13.tar.gz (15.0 kB 查看哈希)

上传时间

构建分布

seed_services_cli-0.0.13-py2.py3-none-any.whl (19.2 kB 查看哈希)

上传时间 Python 2 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面