-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from yojee/add_json_support
Add json support
- Loading branch information
Showing
13 changed files
with
580 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[report] | ||
exclude_lines = | ||
# Don't complain if tests don't hit defensive assertion code: | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,25 +21,30 @@ Features | |
* Exclude data for anonymization depending on regular expressions | ||
* Truncate entire tables for unwanted data | ||
|
||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| Field | Value | Provider | Output | | ||
+================+======================+=======================+==================================+ | ||
| ``first_name`` | John | ``choice`` | (Bob|Larry|Lisa) | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| ``title`` | Dr. | ``clear`` | | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| ``street`` | Irving St | ``faker.street_name`` | Miller Station | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| ``password`` | dsf82hFxcM | ``mask`` | XXXXXXXXXX | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| ``email`` | [email protected] | ``md5`` | 0cba00ca3da1b283a57287bcceb17e35 | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| ``email`` | [email protected] | ``faker.unique.email``| [email protected] | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
| ``ip`` | 157.50.1.20 | ``set`` | 127.0.0.1 | | ||
+----------------+----------------------+-----------------------+----------------------------------+ | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| Field | Value | Provider | Output | | ||
+================+======================+========================+==================================+ | ||
| ``first_name`` | John | ``choice`` | (Bob|Larry|Lisa) | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``title`` | Dr. | ``clear`` | | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``street`` | Irving St | ``faker.street_name`` | Miller Station | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``password`` | dsf82hFxcM | ``mask`` | XXXXXXXXXX | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``email`` | [email protected] | ``md5`` | 0cba00ca3da1b283a57287bcceb17e35 | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``email`` | [email protected] | ``faker.unique.email`` | [email protected] | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``phone_num`` | 65923473 | ``md5``as_number: True | 3948293448 | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``ip`` | 157.50.1.20 | ``set`` | 127.0.0.1 | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
| ``uuid_col`` | 00010203-0405-...... | ``uuid4`` | f7c1bd87-4d.... | | ||
+----------------+----------------------+------------------------+----------------------------------+ | ||
|
||
Note: `faker.unique.[provider]` only supported on python3.5+ (Faker library min supported python version) | ||
Note: `uuid4` - only for (native `uuid4<https://www.postgresql.org/docs/current/datatype-uuid.html>`) columns | ||
|
||
See the `documentation`_ for a more detailed description of the provided anonymization methods. | ||
|
||
|
@@ -81,6 +86,7 @@ Despite the database connection values, you will have to define a YAML schema fi | |
all anonymization rules for that database. Take a look at the `schema documentation`_ or the | ||
`YAML sample schema`_. | ||
|
||
|
||
Example call:: | ||
|
||
$ pganonymize --schema=myschema.yml \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.