diff --git a/faker_cli/cli.py b/faker_cli/cli.py index 07e4a83..b8d0c8d 100644 --- a/faker_cli/cli.py +++ b/faker_cli/cli.py @@ -1,11 +1,18 @@ -from faker import Faker -import click import sys -from faker_cli.templates import CloudFrontWriter, S3AccessLogs, S3AccessWriter, CloudTrailLogs, CloudFrontLogs - -from faker_cli.writer import CSVWriter, JSONWriter, ParquetWriter, DeltaLakeWriter from typing import List +import click +from faker import Faker + +from faker_cli.templates import ( + CloudFrontLogs, + CloudFrontWriter, + S3AccessLogs, + S3AccessWriter, +) +from faker_cli.writer import CSVWriter, JSONWriter + + def infer_column_names(col_names, col_types: str) -> List[str]: """ Infer column names from column types @@ -13,14 +20,13 @@ def infer_column_names(col_names, col_types: str) -> List[str]: # For now, nothing special - but eventually we need to parse things out if col_names: return col_names.split(",") - + return col_types.split(",") + KLAS_MAPPER = { "csv": CSVWriter, "json": JSONWriter, - "parquet": ParquetWriter, - "deltalake": DeltaLakeWriter } TEMPLATE_MAPPER = { @@ -32,9 +38,16 @@ def infer_column_names(col_names, col_types: str) -> List[str]: fake.add_provider(S3AccessLogs) fake.add_provider(CloudFrontLogs) + @click.command() @click.option("--num-rows", "-n", default=1, help="Number of rows") -@click.option("--format", "-f", type=click.Choice(["csv", "json", "parquet", "deltalake"]), default="csv", help="Format of the output") +@click.option( + "--format", + "-f", + type=click.Choice(["csv", "json", "parquet", "deltalake"]), + default="csv", + help="Format of the output", +) @click.option("--output", "-o", type=click.Path(writable=True)) @click.option("--columns", "-c", help="Column names", default=None, required=False) @click.option("--template", "-t", help="Template to use", type=click.Choice(["s3access", "cloudfront"]), default=None) @@ -53,16 +66,37 @@ def main(num_rows, format, output, columns, template, column_types): ctx = click.get_current_context() click.echo(ctx.get_help()) ctx.exit() - raise click.BadArgumentUsage( - "either --template or a list of Faker property names must be provided." - ) + raise click.BadArgumentUsage("either --template or a list of Faker property names must be provided.") # Parquet output requires a filename if format in ["parquet", "deltalake"] and output is None: raise click.BadArgumentUsage("parquet | deltalake formats requires --output/-o filename parameter.") if output is not None and format not in ["parquet", "deltalake"]: raise click.BadArgumentUsage("output files not supported for csv/json yet.") - + + # Optionally load additional features + if format == "parquet": + try: + from faker_cli.writers.parquet import ParquetWriter + + KLAS_MAPPER["parquet"] = ParquetWriter + except ImportError: + raise click.ClickException( + "Using Parquet writer, but the 'pyarrow' package is not installed. " + "Make sure to install faker-cli using `pip install faker-cli[parquet]`." + ) + + if format == "deltalake": + try: + from faker_cli.writers.delta import DeltaLakeWriter + + KLAS_MAPPER["deltalake"] = DeltaLakeWriter + except ImportError: + raise click.ClickException( + "Using Delta writer, but the 'deltalake' package is not installed. " + "Make sure to install faker-cli using `pip install faker-cli[delta]`." + ) + # If the user provides a template, we use that provider and writer and exit. # We assume a template has a custom writer that may be different than CSV or JSON if template: @@ -72,13 +106,13 @@ def main(num_rows, format, output, columns, template, column_types): row = fake.format(log_entry) writer.write(row) return - + # Now, if a template hasn't been provided, generate some fake data! col_types = column_types.split(",") headers = infer_column_names(columns, column_types) writer = KLAS_MAPPER.get(format)(sys.stdout, headers, output) for i in range(num_rows): # TODO: Handle args - row = [ fake.format(ctype) for ctype in col_types ] + row = [fake.format(ctype) for ctype in col_types] writer.write(row) writer.close() diff --git a/faker_cli/writer.py b/faker_cli/writer.py index 4103f8d..3dc0255 100644 --- a/faker_cli/writer.py +++ b/faker_cli/writer.py @@ -1,9 +1,6 @@ import csv import json from typing import Optional -import pyarrow as pa -import pyarrow.parquet as pq -import deltalake class Writer: @@ -38,27 +35,3 @@ def write(self, row): jsonl = json.dumps(dict(zip(self.headers, row)), default=str) self.writer.write(jsonl) self.writer.write("\n") - - -class ParquetWriter(Writer): - def __init__(self, output, headers, filename): - super().__init__(output, headers) - self.filename = filename - self.table: pa.Table = None - - def write(self, row): - ini_dict = [{k: [v]} for k, v in list(zip(self.headers, row))] - tbl = {k: v for d in ini_dict for k, v in d.items()} - table = pa.table(tbl) - if self.table is None: - self.table = table - else: - self.table = pa.concat_tables([self.table, table]) - - def close(self): - pq.write_table(self.table, self.filename) - - -class DeltaLakeWriter(ParquetWriter): - def close(self): - deltalake.write_deltalake(table_or_uri=self.filename, data=self.table) diff --git a/faker_cli/writers/delta.py b/faker_cli/writers/delta.py new file mode 100644 index 0000000..ec6d546 --- /dev/null +++ b/faker_cli/writers/delta.py @@ -0,0 +1,8 @@ +import deltalake + +from faker_cli.writers.parquet import ParquetWriter + + +class DeltaLakeWriter(ParquetWriter): + def close(self): + deltalake.write_deltalake(table_or_uri=self.filename, data=self.table) diff --git a/faker_cli/writers/parquet.py b/faker_cli/writers/parquet.py new file mode 100644 index 0000000..bbead2c --- /dev/null +++ b/faker_cli/writers/parquet.py @@ -0,0 +1,23 @@ + +import pyarrow as pa +import pyarrow.parquet as pq + +from faker_cli.writer import Writer + +class ParquetWriter(Writer): + def __init__(self, output, headers, filename): + super().__init__(output, headers) + self.filename = filename + self.table: pa.Table = None + + def write(self, row): + ini_dict = [{k: [v]} for k, v in list(zip(self.headers, row))] + tbl = {k: v for d in ini_dict for k, v in d.items()} + table = pa.table(tbl) + if self.table is None: + self.table = table + else: + self.table = pa.concat_tables([self.table, table]) + + def close(self): + pq.write_table(self.table, self.filename) \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 59337aa..56198ec 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -18,6 +19,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -29,6 +31,7 @@ files = [ name = "deltalake" version = "0.9.0" description = "Native Delta Lake Python binding based on delta-rs with Pandas integration" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -53,6 +56,7 @@ pyspark = ["delta-spark", "numpy (==1.22.2)", "pyspark"] name = "exceptiongroup" version = "1.1.1" description = "Backport of PEP 654 (exception groups)" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -67,6 +71,7 @@ test = ["pytest (>=6)"] name = "faker" version = "18.10.1" description = "Faker is a Python package that generates fake data for you." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -81,6 +86,7 @@ python-dateutil = ">=2.4" name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -92,6 +98,7 @@ files = [ name = "numpy" version = "1.24.3" description = "Fundamental package for array computing in Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -129,6 +136,7 @@ files = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -140,6 +148,7 @@ files = [ name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -153,36 +162,48 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pyarrow" -version = "12.0.0" +version = "14.0.2" description = "Python library for Apache Arrow" +category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pyarrow-12.0.0-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:3b97649c8a9a09e1d8dc76513054f1331bd9ece78ee39365e6bf6bc7503c1e94"}, - {file = "pyarrow-12.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bc4ea634dacb03936f50fcf59574a8e727f90c17c24527e488d8ceb52ae284de"}, - {file = "pyarrow-12.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d568acfca3faa565d663e53ee34173be8e23a95f78f2abfdad198010ec8f745"}, - {file = "pyarrow-12.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1b50bb9a82dca38a002d7cbd802a16b1af0f8c50ed2ec94a319f5f2afc047ee9"}, - {file = "pyarrow-12.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:3d1733b1ea086b3c101427d0e57e2be3eb964686e83c2363862a887bb5c41fa8"}, - {file = "pyarrow-12.0.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:a7cd32fe77f967fe08228bc100433273020e58dd6caced12627bcc0a7675a513"}, - {file = "pyarrow-12.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:92fb031e6777847f5c9b01eaa5aa0c9033e853ee80117dce895f116d8b0c3ca3"}, - {file = "pyarrow-12.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:280289ebfd4ac3570f6b776515baa01e4dcbf17122c401e4b7170a27c4be63fd"}, - {file = "pyarrow-12.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:272f147d4f8387bec95f17bb58dcfc7bc7278bb93e01cb7b08a0e93a8921e18e"}, - {file = "pyarrow-12.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:0846ace49998825eda4722f8d7f83fa05601c832549c9087ea49d6d5397d8cec"}, - {file = "pyarrow-12.0.0-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:993287136369aca60005ee7d64130f9466489c4f7425f5c284315b0a5401ccd9"}, - {file = "pyarrow-12.0.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a7b6a765ee4f88efd7d8348d9a1f804487d60799d0428b6ddf3344eaef37282"}, - {file = "pyarrow-12.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1c4fce253d5bdc8d62f11cfa3da5b0b34b562c04ce84abb8bd7447e63c2b327"}, - {file = "pyarrow-12.0.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e6be4d85707fc8e7a221c8ab86a40449ce62559ce25c94321df7c8500245888f"}, - {file = "pyarrow-12.0.0-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:ea830d9f66bfb82d30b5794642f83dd0e4a718846462d22328981e9eb149cba8"}, - {file = "pyarrow-12.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7b5b9f60d9ef756db59bec8d90e4576b7df57861e6a3d6a8bf99538f68ca15b3"}, - {file = "pyarrow-12.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b99e559d27db36ad3a33868a475f03e3129430fc065accc839ef4daa12c6dab6"}, - {file = "pyarrow-12.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5b0810864a593b89877120972d1f7af1d1c9389876dbed92b962ed81492d3ffc"}, - {file = "pyarrow-12.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:23a77d97f4d101ddfe81b9c2ee03a177f0e590a7e68af15eafa06e8f3cf05976"}, - {file = "pyarrow-12.0.0-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:2cc63e746221cddb9001f7281dee95fd658085dd5b717b076950e1ccc607059c"}, - {file = "pyarrow-12.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d8c26912607e26c2991826bbaf3cf2b9c8c3e17566598c193b492f058b40d3a4"}, - {file = "pyarrow-12.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d8b90efc290e99a81d06015f3a46601c259ecc81ffb6d8ce288c91bd1b868c9"}, - {file = "pyarrow-12.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2466be046b81863be24db370dffd30a2e7894b4f9823fb60ef0a733c31ac6256"}, - {file = "pyarrow-12.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:0e36425b1c1cbf5447718b3f1751bf86c58f2b3ad299f996cd9b1aa040967656"}, - {file = "pyarrow-12.0.0.tar.gz", hash = "sha256:19c812d303610ab5d664b7b1de4051ae23565f9f94d04cbea9e50569746ae1ee"}, + {file = "pyarrow-14.0.2-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:ba9fe808596c5dbd08b3aeffe901e5f81095baaa28e7d5118e01354c64f22807"}, + {file = "pyarrow-14.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:22a768987a16bb46220cef490c56c671993fbee8fd0475febac0b3e16b00a10e"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dbba05e98f247f17e64303eb876f4a80fcd32f73c7e9ad975a83834d81f3fda"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a898d134d00b1eca04998e9d286e19653f9d0fcb99587310cd10270907452a6b"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:87e879323f256cb04267bb365add7208f302df942eb943c93a9dfeb8f44840b1"}, + {file = "pyarrow-14.0.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:76fc257559404ea5f1306ea9a3ff0541bf996ff3f7b9209fc517b5e83811fa8e"}, + {file = "pyarrow-14.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0c4a18e00f3a32398a7f31da47fefcd7a927545b396e1f15d0c85c2f2c778cd"}, + {file = "pyarrow-14.0.2-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:87482af32e5a0c0cce2d12eb3c039dd1d853bd905b04f3f953f147c7a196915b"}, + {file = "pyarrow-14.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:059bd8f12a70519e46cd64e1ba40e97eae55e0cbe1695edd95384653d7626b23"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f16111f9ab27e60b391c5f6d197510e3ad6654e73857b4e394861fc79c37200"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06ff1264fe4448e8d02073f5ce45a9f934c0f3db0a04460d0b01ff28befc3696"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:6dd4f4b472ccf4042f1eab77e6c8bce574543f54d2135c7e396f413046397d5a"}, + {file = "pyarrow-14.0.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:32356bfb58b36059773f49e4e214996888eeea3a08893e7dbde44753799b2a02"}, + {file = "pyarrow-14.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:52809ee69d4dbf2241c0e4366d949ba035cbcf48409bf404f071f624ed313a2b"}, + {file = "pyarrow-14.0.2-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:c87824a5ac52be210d32906c715f4ed7053d0180c1060ae3ff9b7e560f53f944"}, + {file = "pyarrow-14.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a25eb2421a58e861f6ca91f43339d215476f4fe159eca603c55950c14f378cc5"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5c1da70d668af5620b8ba0a23f229030a4cd6c5f24a616a146f30d2386fec422"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cc61593c8e66194c7cdfae594503e91b926a228fba40b5cf25cc593563bcd07"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:78ea56f62fb7c0ae8ecb9afdd7893e3a7dbeb0b04106f5c08dbb23f9c0157591"}, + {file = "pyarrow-14.0.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:37c233ddbce0c67a76c0985612fef27c0c92aef9413cf5aa56952f359fcb7379"}, + {file = "pyarrow-14.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:e4b123ad0f6add92de898214d404e488167b87b5dd86e9a434126bc2b7a5578d"}, + {file = "pyarrow-14.0.2-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:e354fba8490de258be7687f341bc04aba181fc8aa1f71e4584f9890d9cb2dec2"}, + {file = "pyarrow-14.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:20e003a23a13da963f43e2b432483fdd8c38dc8882cd145f09f21792e1cf22a1"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc0de7575e841f1595ac07e5bc631084fd06ca8b03c0f2ecece733d23cd5102a"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66e986dc859712acb0bd45601229021f3ffcdfc49044b64c6d071aaf4fa49e98"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:f7d029f20ef56673a9730766023459ece397a05001f4e4d13805111d7c2108c0"}, + {file = "pyarrow-14.0.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:209bac546942b0d8edc8debda248364f7f668e4aad4741bae58e67d40e5fcf75"}, + {file = "pyarrow-14.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:1e6987c5274fb87d66bb36816afb6f65707546b3c45c44c28e3c4133c010a881"}, + {file = "pyarrow-14.0.2-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:a01d0052d2a294a5f56cc1862933014e696aa08cc7b620e8c0cce5a5d362e976"}, + {file = "pyarrow-14.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a51fee3a7db4d37f8cda3ea96f32530620d43b0489d169b285d774da48ca9785"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64df2bf1ef2ef14cee531e2dfe03dd924017650ffaa6f9513d7a1bb291e59c15"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c0fa3bfdb0305ffe09810f9d3e2e50a2787e3a07063001dcd7adae0cee3601a"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:c65bf4fd06584f058420238bc47a316e80dda01ec0dfb3044594128a6c2db794"}, + {file = "pyarrow-14.0.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:63ac901baec9369d6aae1cbe6cca11178fb018a8d45068aaf5bb54f94804a866"}, + {file = "pyarrow-14.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:75ee0efe7a87a687ae303d63037d08a48ef9ea0127064df18267252cfe2e9541"}, + {file = "pyarrow-14.0.2.tar.gz", hash = "sha256:36cef6ba12b499d864d1def3e990f97949e0b79400d08b7cf74504ffbd3eb025"}, ] [package.dependencies] @@ -192,6 +213,7 @@ numpy = ">=1.16.6" name = "pytest" version = "7.3.1" description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -214,6 +236,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -228,6 +251,7 @@ six = ">=1.5" name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -239,6 +263,7 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -246,7 +271,11 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +[extras] +delta = ["deltalake", "pyarrow"] +parquet = ["pyarrow"] + [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "ae20e74afe90ab4a69125092bdf1682cfa64ccc748d4f831d7f25f1d49979ae3" +content-hash = "607005e57d90215663b379a4096b0df52194c68bc2b766ff6d640fc98d036d4d" diff --git a/pyproject.toml b/pyproject.toml index fe4a3f2..8bc3051 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "faker-cli" -version = "0.3.0" +version = "0.4.0" description = "Command-line fake data generator" authors = ["Damon P. Cortesi "] readme = "README.md" @@ -10,8 +10,12 @@ packages = [{include = "faker_cli"}] python = "^3.9" faker = "^18.9.0" click = "^8.1.3" -pyarrow = "^12.0.0" -deltalake = "^0.9.0" +pyarrow = { version = "~14.0.2", optional = true } +deltalake = { version = "^0.9.0", optional = true } + +[tool.poetry.extras] +delta = ["deltalake", "pyarrow"] +parquet = ["pyarrow"] [tool.poetry.group.dev.dependencies]