From 1e67f0c7e8e6efeba3d84f4e2a94b90c4fe1eb6e Mon Sep 17 00:00:00 2001 From: Tiago Rinaldi Date: Tue, 30 Jan 2018 21:42:06 -0200 Subject: [PATCH 1/2] Change README.md --- README.md | 83 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index ea0c14b..3ead571 100644 --- a/README.md +++ b/README.md @@ -7,52 +7,58 @@ -##### About +## About Generate fake but valid data filled databases for test purposes using most popular patterns(AFAIK). Current support is *sqlite, mysql, postgresql, mongodb, redis, couchdb*.
-##### Installation +## Installation The installation through pypi retrieves 'fake-factory' as a main dependency. -> pip install fake2db -
-###### Optional requirements + pip install fake2db + + +## Optional requirements + ###### PostgreSQL pip install psycopg2 -For psycopg2 to install you need *pg_config* in your system. +For `psycopg2` to install you need `pg_config` in your system. + +On **Mac**, the solution is to install `postgresql`: + + brew install postgresql -On Mac, the solution is to install *postgresql*: -> brew install postgresql +On **CentOS**, the solution is to install `postgresql-devel`: -On CentOS, the solution is to install *postgresql-devel*: -> sudo yum install postgresql-devel -
+ sudo yum install postgresql-devel -###### Mongodb + +#### Mongodb pip install pymongo -###### Redis +#### Redis pip install redis -###### MySQL +#### MySQL mysql connector is needed for mysql db generation: -> http://dev.mysql.com/downloads/connector/python/ -
+ +>http://dev.mysql.com/downloads/connector/python/ + -##### CouchDB +### CouchDB - pip install couchdb + pip install couchdb -##### Usage +*** +##Usage *--rows* argument is pretty clear :) integer @@ -73,21 +79,20 @@ mysql connector is needed for mysql db generation: *--seed* argument is OPTIONAL. Integer for seeding random generator to produce the same data set between runs. Note: uuid4 values still generated randomly. -> fake2db --rows 200 --db sqlite -
-> fake2db --rows 1500 --db postgresql --name test_database_postgre -
-> fake2db --db postgresql --rows 2500 --host container.local --password password --user docker -
-> fake2db --rows 200 --db sqlite --locale cs_CZ --seed 1337 -
+`fake2db --rows 200 --db sqlite` + +`fake2db --rows 1500 --db postgresql --name test_database_postgre` + +`fake2db --db postgresql --rows 2500 --host container.local --password password --user docker` + +`fake2db --rows 200 --db sqlite --locale cs_CZ --seed 1337` In addition to the databases supported in the db argument, you can also run fake2db with FoundationDB SQL Layer. Once SQL Layer is installed, simply use the postgresql generator and specify the SQL Layer port. For example: -> fake2db --rows --db postgresql --port 15432 +`fake2db --rows --db postgresql --port 15432` -##### Custom Database Generation +## Custom Database Generation If you want to create a custom db/table, you have to provide **--custom** parameter followed by the column item you want. At the point in time, i mapped all the possible column items you can use here: @@ -95,19 +100,19 @@ If you want to create a custom db/table, you have to provide **--custom** parame Feed any keys you want to the custom flag: -> fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country -
->fake2db.py --rows 1500 --db mysql --password randompassword --custom currency_code credit_card_full credit_card_provider -
->fake2db.py --rows 20 --db mongodb --custom name date country +`fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country` + +`fake2db.py --rows 1500 --db mysql --password randompassword --custom currency_code credit_card_full credit_card_provider` + +`fake2db.py --rows 20 --db mongodb --custom name date country` +## Sample output - SQLite -
-##### Sample output - sqlite ![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/fake2db_example_sqlite.png) -
+ ![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/mysql_fake2db.png) -
+ + ![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/pg_fake2db.png) -
+ From d2f8ecb02db74b18bd905cd9a3dc8c2fb856e88f Mon Sep 17 00:00:00 2001 From: Tiago Rinaldi Date: Tue, 30 Jan 2018 21:42:06 -0200 Subject: [PATCH 2/2] Change README.md --- README.md | 83 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index ea0c14b..a52afea 100644 --- a/README.md +++ b/README.md @@ -7,52 +7,58 @@ -##### About +## About Generate fake but valid data filled databases for test purposes using most popular patterns(AFAIK). Current support is *sqlite, mysql, postgresql, mongodb, redis, couchdb*.
-##### Installation +## Installation The installation through pypi retrieves 'fake-factory' as a main dependency. -> pip install fake2db -
-###### Optional requirements + pip install fake2db + + +## Optional requirements + ###### PostgreSQL pip install psycopg2 -For psycopg2 to install you need *pg_config* in your system. +For `psycopg2` to install you need `pg_config` in your system. + +On **Mac**, the solution is to install `postgresql`: + + brew install postgresql -On Mac, the solution is to install *postgresql*: -> brew install postgresql +On **CentOS**, the solution is to install `postgresql-devel`: -On CentOS, the solution is to install *postgresql-devel*: -> sudo yum install postgresql-devel -
+ sudo yum install postgresql-devel -###### Mongodb + +#### Mongodb pip install pymongo -###### Redis +#### Redis pip install redis -###### MySQL +#### MySQL mysql connector is needed for mysql db generation: -> http://dev.mysql.com/downloads/connector/python/ -
+ +>http://dev.mysql.com/downloads/connector/python/ + -##### CouchDB +### CouchDB - pip install couchdb + pip install couchdb -##### Usage +*** +## Usage *--rows* argument is pretty clear :) integer @@ -73,21 +79,20 @@ mysql connector is needed for mysql db generation: *--seed* argument is OPTIONAL. Integer for seeding random generator to produce the same data set between runs. Note: uuid4 values still generated randomly. -> fake2db --rows 200 --db sqlite -
-> fake2db --rows 1500 --db postgresql --name test_database_postgre -
-> fake2db --db postgresql --rows 2500 --host container.local --password password --user docker -
-> fake2db --rows 200 --db sqlite --locale cs_CZ --seed 1337 -
+`fake2db --rows 200 --db sqlite` + +`fake2db --rows 1500 --db postgresql --name test_database_postgre` + +`fake2db --db postgresql --rows 2500 --host container.local --password password --user docker` + +`fake2db --rows 200 --db sqlite --locale cs_CZ --seed 1337` In addition to the databases supported in the db argument, you can also run fake2db with FoundationDB SQL Layer. Once SQL Layer is installed, simply use the postgresql generator and specify the SQL Layer port. For example: -> fake2db --rows --db postgresql --port 15432 +`fake2db --rows --db postgresql --port 15432` -##### Custom Database Generation +## Custom Database Generation If you want to create a custom db/table, you have to provide **--custom** parameter followed by the column item you want. At the point in time, i mapped all the possible column items you can use here: @@ -95,19 +100,19 @@ If you want to create a custom db/table, you have to provide **--custom** parame Feed any keys you want to the custom flag: -> fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country -
->fake2db.py --rows 1500 --db mysql --password randompassword --custom currency_code credit_card_full credit_card_provider -
->fake2db.py --rows 20 --db mongodb --custom name date country +`fake2db.py --rows 250 --db mysql --username mysql --password somepassword --custom name date country` + +`fake2db.py --rows 1500 --db mysql --password randompassword --custom currency_code credit_card_full credit_card_provider` + +`fake2db.py --rows 20 --db mongodb --custom name date country` +## Sample output - SQLite -
-##### Sample output - sqlite ![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/fake2db_example_sqlite.png) -
+ ![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/mysql_fake2db.png) -
+ + ![Screenshot](https://raw.github.com/emirozer/fake2db/master/docs/pg_fake2db.png) -
+