fake2db:一个生成测试数据的工具

xiaohai 2021-05-05 21:40:16 3745人围观 标签: Python 
简介Fake2DB是emirozer 开发的一个生成测试数据的工具。目前支持 SQLite、MySQL、PostgreSQL 和 MongoDB。
简介

Fake2DB是emirozer 开发的一个生成测试数据的工具。目前支持 SQLite、MySQL、PostgreSQL 和 MongoDB。

GitHub地址:https://github.com/emirozer/fake2db

安装
  1. [root@localhost ~]# pip install fake2db
测试

1、redis测试

  1. #首先安装redis
  2. [root@localhost ~]# pip install redis
  3. #进行测试
  4. [root@localhost ~]# fake2db --rows 10000 --db redis
  5. 2018-07-06 23:14:13,894 root Rows argument : 10000
  6. 2018-07-06 23:14:32,266 root simple_registration Commits are successful after write job!
  7. 2018-07-06 23:15:27,276 root detailed_registration Commits are successful after write job!
  8. 2018-07-06 23:16:55,702 root companies Commits are successful after write job!
  9. 2018-07-06 23:16:58,608 root user_agent Commits are successful after write job!
  10. 2018-07-06 23:18:06,923 root customer Commits are successful after write job!