2
2
3
3
CLI utility that generates data in various formats.
4
4
5
+ fakedata int,1..100 # will generate only integers between 1 and 100- [ Overview] ( #overview )
6
+ - [ Quick start] ( #quick-start )
7
+ - [ Generators] ( #generators )
8
+ - [ Formatters] ( #formatters )
9
+ - [ How to install] ( #how-to-install )
10
+ - [ How to contribute] ( #how-to-contribute )
11
+ - [ Code of conduct] ( #code-of-counduct )
12
+
5
13
# Overview
6
14
7
15
` fakedata ` is a small utility that generates data from the command line:
8
16
17
+ ## Quick start
18
+
9
19
``` sh
10
20
$ fakedata email country
11
21
@@ -47,39 +57,30 @@ Shoes,Freetop
47
57
Tools,Domnix
48
58
```
49
59
50
- List the available generators:
60
+ ## Generators
61
+
62
+ ` fakedata ` provides a number of generators:
51
63
52
64
``` sh
53
65
$ fakedata --generators
54
66
color
55
67
country
56
- country.code
57
- domain
58
- domain.name
59
- domain.tld
60
- double
61
- email
62
- event.action
63
- http.method
64
- id
65
- ipv4
66
- ipv6
67
- latitude
68
- longitude
69
- mac.address
70
- name
71
- name.first
72
- name.last
73
- product.category
74
- product.name
75
- state
76
- state.code
77
- timezone
78
- unixtime
79
- username
68
+ ...
69
+ # It's a long list :)
70
+ ```
71
+
72
+ Some generators allow you to pass in a range so you can scope their generation
73
+ to a subset of values:
74
+
75
+ ``` sh
76
+ $ fakedata int,1..100 # will generate only integers between 1 and 100
77
+ $ fakedata int,50.. # specifying only min number works too
78
+ $ fakedata int,50 # also works
80
79
```
81
80
82
- ## SQL formatter
81
+ ## Formatters
82
+
83
+ ### SQL formatter
83
84
84
85
` fakedata ` can generate insert statements. By default, it uses the name of the generators
85
86
as column names:
@@ -89,15 +90,15 @@ $ fakedata email domain --format=sql --limit 1
89
90
INSERT INTO TABLE (email,domain) values (
' [email protected] ' ,
' example.me' )
;
90
91
```
91
92
92
- You can specify the name of the column using a field with the following format ` column_name=generator ` .
93
- For example:
93
+ You can specify the name of the column using a field with the following format
94
+ ` column_name=generator ` . For example:
94
95
95
96
``` sh
96
97
$ fakedata login=email referral=domain --format=sql --limit 1
97
98
INSERT INTO TABLE (login,referral) values (
' [email protected] ' ,
' test.me' )
;
98
99
```
99
100
100
- # Installation guide
101
+ # How to install
101
102
102
103
## Homebrew
103
104
0 commit comments