短线导入导出工具
diet的Python项目详细描述
饮食
仪表板导入导出工具
安装
pip install --user -U diet
用法
Dash Import and Export Tool
positional arguments:
{import,export} Action to perform
{users-orgs,users} The target of the import/export
file Files to import
optional arguments:
-h, --help show this help message and exit
将用户导入系统
diet import users ./user-records.csv
配置
此文件必须存在,应用程序才能运行
所有配置设置都存储在~/.diet/config.json中
{"auth":{"client_id":"","client_secret":"","host":"","verify_ssl":true},"api":{"client_id":"","client_secret":"","host":"","verify_ssl":true}}
顶级属性确定要配置的服务,目前有两个服务,api和auth。api是主要的应用服务,auth是sporga的认证服务。
Setting | Description |
---|---|
client_id | The client id to authenticate with |
client_secret | The client secret to authenticate with |
host | The url of the service to import/export |
verify_ssl | Enable/disable SSL certificate verifcation |
导入文件结构
支持的文件类型
- CSV
csv文件必须包含与要导入的字段名完全匹配的头行
用户导入
firstName | surname | gender | address | suburb | state | mobilePhoneNumber | password | postcode | |
---|---|---|---|---|---|---|---|---|---|
Test | Administrator | csss@sporga.com.au | Female | 20 resolution Dr | Caringbah | NSW | 61410100100 | ******* | 2229 |