mostlyai-mock 0.1.6__py3-none-any.whl → 0.1.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mostlyai/mock/__init__.py +1 -1
- mostlyai/mock/core.py +10 -2
- {mostlyai_mock-0.1.6.dist-info → mostlyai_mock-0.1.7.dist-info}/METADATA +1 -1
- mostlyai_mock-0.1.7.dist-info/RECORD +8 -0
- mostlyai_mock-0.1.6.dist-info/RECORD +0 -8
- {mostlyai_mock-0.1.6.dist-info → mostlyai_mock-0.1.7.dist-info}/WHEEL +0 -0
- {mostlyai_mock-0.1.6.dist-info → mostlyai_mock-0.1.7.dist-info}/entry_points.txt +0 -0
- {mostlyai_mock-0.1.6.dist-info → mostlyai_mock-0.1.7.dist-info}/licenses/LICENSE +0 -0
mostlyai/mock/__init__.py
CHANGED
mostlyai/mock/core.py
CHANGED
@@ -737,7 +737,7 @@ def _build_execution_plan(config: MockConfig) -> list[str]:
|
|
737
737
|
def sample(
|
738
738
|
*,
|
739
739
|
tables: dict[str, dict],
|
740
|
-
sample_size: int | dict[str, int] =
|
740
|
+
sample_size: int | dict[str, int] = 4,
|
741
741
|
existing_data: dict[str, pd.DataFrame] | None = None,
|
742
742
|
model: str = "openai/gpt-4.1-nano",
|
743
743
|
api_key: str | None = None,
|
@@ -748,12 +748,20 @@ def sample(
|
|
748
748
|
"""
|
749
749
|
Generate mock data from scratch or enrich existing data by prompting an LLM.
|
750
750
|
|
751
|
+
While faker and numpy are useful to create fake data, this utility is unique as it allows
|
752
|
+
the creation of coherent, realistic multi-table tabular mock data
|
753
|
+
or the enrichment of existing datasets with new, context-aware columns.
|
754
|
+
|
755
|
+
It is particularly useful for quickly simulating production-like datasets for testing or prototyping purposes.
|
756
|
+
It is advised to limit mocking to small datasets for performance reasons (rows * cols < 100).
|
757
|
+
It might take a couple of minutes for bigger datasets.
|
758
|
+
|
751
759
|
Args:
|
752
760
|
tables (dict[str, dict]): The table specifications to generate mock data for. See examples for usage.
|
753
761
|
sample_size (int | dict[str, int]): The number of rows to generate for each subject table.
|
754
762
|
If a single integer is provided, the same number of rows will be generated for each subject table.
|
755
763
|
If a dictionary is provided, the number of rows to generate for each subject table can be specified individually.
|
756
|
-
Default is
|
764
|
+
Default is 4. Ignored if existing_data is provided.
|
757
765
|
If a table has a foreign key, the sample size is determined by the corresponding foreign key prompt. If nothing specified, a few rows per parent record are generated.
|
758
766
|
existing_data (dict[str, pd.DataFrame] | None): Existing data to augment. If provided, the sample_size argument is ignored.
|
759
767
|
Default is None.
|
@@ -0,0 +1,8 @@
|
|
1
|
+
mostlyai/mock/__init__.py,sha256=Cmo4Ko8-X41gSewcEpNTTvw7bpRUrtn6B5Cmnwric-Q,714
|
2
|
+
mostlyai/mock/core.py,sha256=L-PbOTSIR1cfBeMZL8-v5k7VhxBfKAoyw230soBwQWc,42754
|
3
|
+
mostlyai/mock/mcp_server.py,sha256=kWMIjKCwnvYfjY8B2IdP4JNs8ik_8jA6ISCDqrG9utc,2137
|
4
|
+
mostlyai_mock-0.1.7.dist-info/METADATA,sha256=6tLpoqLx-LOI-Cr_O_xWm4LI5PBfa4nt1FkrqdNIpQA,13918
|
5
|
+
mostlyai_mock-0.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
+
mostlyai_mock-0.1.7.dist-info/entry_points.txt,sha256=XDbppUIAaCWW0nresVep8zb71pkzZuFA16jCBHq8CU8,61
|
7
|
+
mostlyai_mock-0.1.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
8
|
+
mostlyai_mock-0.1.7.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
mostlyai/mock/__init__.py,sha256=8UddMHmwpfwSb7ChuVNvIaWNLTlWkN0Cxh63CskmtBw,714
|
2
|
-
mostlyai/mock/core.py,sha256=NFfyucqjT3iC9lqfu4dPmRnYizxtfFH1Tf3KHRRxHvg,42242
|
3
|
-
mostlyai/mock/mcp_server.py,sha256=kWMIjKCwnvYfjY8B2IdP4JNs8ik_8jA6ISCDqrG9utc,2137
|
4
|
-
mostlyai_mock-0.1.6.dist-info/METADATA,sha256=RMYEgGG4P3WfhavNC_4ph6dTCtumqQ3uA-swot9WKyc,13918
|
5
|
-
mostlyai_mock-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
6
|
-
mostlyai_mock-0.1.6.dist-info/entry_points.txt,sha256=XDbppUIAaCWW0nresVep8zb71pkzZuFA16jCBHq8CU8,61
|
7
|
-
mostlyai_mock-0.1.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
8
|
-
mostlyai_mock-0.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|