diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dbe8ec..a69ee75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/README.rst b/README.rst index 215bfeb..db690fc 100644 --- a/README.rst +++ b/README.rst @@ -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`) 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. @@ -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 diff --git a/docs/schema.rst b/docs/schema.rst index c223f3a..ee841db 100644 --- a/docs/schema.rst +++ b/docs/schema.rst @@ -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. @@ -272,6 +275,7 @@ This provider will hash the given field value with the MD5 algorithm. - password: provider: name: md5 + as_number: True ``set`` @@ -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 diff --git a/pganonymizer/version.py b/pganonymizer/version.py index 1ab444e..20a8456 100644 --- a/pganonymizer/version.py +++ b/pganonymizer/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = '0.6.0' +__version__ = '0.6.1' diff --git a/pyproject.toml b/pyproject.toml index ce1844f..f564850 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 " diff --git a/setup.py b/setup.py index b66266e..e3fed64 100755 --- a/setup.py +++ b/setup.py @@ -42,10 +42,11 @@ def run(self): install_requires = [ 'faker', - 'six', - 'progress', + 'parmap', + 'pgcopy', 'psycopg2', - 'pyyaml' + 'pyyaml', + 'tqdm' ] tests_require = [ @@ -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',