Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
hkage committed Jul 13, 2021
2 parents 0498476 + 0b811fb commit 055e64a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Development

## 0.6.1 (2021-07-13)

* Added missing dependencies for the `setup.py`

## 0.6.0 (2021-07-13)

* [#28](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/25): Add json support ([nurikk](https://github.com/nurikk))
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Features
| ``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
* Note: ``faker.unique.[provider]`` only supported on Python 3.5+ (Faker library min. supported python version)
* Note: ``uuid4`` - only for (native `uuid4`_) columns

See the `documentation`_ for a more detailed description of the provided anonymization methods.

Expand Down Expand Up @@ -161,6 +161,7 @@ After that you can pass a schema file to the container, using Docker volumes, an
-v


.. _uuid4: https://www.postgresql.org/docs/current/datatype-uuid.html
.. _documentation: https://python-postgresql-anonymizer.readthedocs.io/en/latest/
.. _schema documentation: https://python-postgresql-anonymizer.readthedocs.io/en/latest/schema.html
.. _YAML sample schema: https://github.com/rheinwerk-verlag/postgresql-anonymizer/blob/master/sample_schema.yml
Expand Down
28 changes: 27 additions & 1 deletion docs/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ This provider will replace each character with a static sign.
``md5``
~~~~~~~

**Arguments:** none
**Arguments:**

* ``as_number`` (default ``False``): Return the MD5 hash as an integer.
* ``as_number_length`` (default 8): The length of the integer representation.

This provider will hash the given field value with the MD5 algorithm.

Expand All @@ -272,6 +275,7 @@ This provider will hash the given field value with the MD5 algorithm.
- password:
provider:
name: md5
as_number: True


``set``
Expand Down Expand Up @@ -301,5 +305,27 @@ The value can also be a dictionary for JSONB columns::
name: set
value: '{"foo": "bar", "baz": 1}'


``uuid4``
~~~~~~~~~

**Arguments:** none

This provider will replace values with a unique UUID4.

.. note::
The provider will only generate `native UUIDs`_. If you want to use UUIDs for character based columns, use
``fake.uuid4`` instead.

**Example usage**::

tables:
- auth_user:
fields:
- first_name:
provider:
name: uuid4

.. _Faker: https://github.com/joke2k/faker
.. _Faker documentation: http://faker.rtfd.org/
.. _native UUIDs: https://www.postgresql.org/docs/current/datatype-uuid.html
2 changes: 1 addition & 1 deletion pganonymizer/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = '0.6.0'
__version__ = '0.6.1'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "postgresql-anonymizer"
version = "0.6.0"
version = "0.6.1"
description = "Commandline tool to anonymize PostgreSQL databases"
authors = [
"Henning Kage <[email protected]>"
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ def run(self):

install_requires = [
'faker',
'six',
'progress',
'parmap',
'pgcopy',
'psycopg2',
'pyyaml'
'pyyaml',
'tqdm'
]

tests_require = [
Expand All @@ -71,7 +72,7 @@ def run(self):
url='https://github.com/rheinwerk-verlag/postgresql-anonymizer',
license='MIT license',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
Expand Down

0 comments on commit 055e64a

Please sign in to comment.