mostlyai-mock 0.1.14__py3-none-any.whl → 0.1.15__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 CHANGED
@@ -15,4 +15,4 @@
15
15
  from mostlyai.mock.core import sample
16
16
 
17
17
  __all__ = ["sample"]
18
- __version__ = "0.1.14" # Do not set this manually. Use poetry version [params].
18
+ __version__ = "0.1.15" # Do not set this manually. Use poetry version [params].
mostlyai/mock/core.py CHANGED
@@ -40,10 +40,10 @@ class LLMOutputFormat(str, Enum):
40
40
 
41
41
 
42
42
  class LLMConfig(BaseModel):
43
- model: str = "openai/gpt-4.1-nano"
44
- api_key: str | None = None
45
- temperature: float = 1.0
46
- top_p: float = 0.95
43
+ model: str
44
+ api_key: str | None
45
+ temperature: float
46
+ top_p: float
47
47
 
48
48
 
49
49
  class MockConfig(RootModel[dict[str, "TableConfig"]]):
@@ -270,8 +270,7 @@ async def _sample_table(
270
270
 
271
271
 
272
272
  def _create_system_prompt(llm_output_format: LLMOutputFormat) -> str:
273
- return f"""
274
- You are a specialized data generator designed to create highly realistic, contextually appropriate data based on schema definitions.
273
+ return f"""You are a specialized data generator designed to create highly realistic, contextually appropriate data based on schema definitions.
275
274
 
276
275
  Your task is to:
277
276
 
@@ -289,8 +288,7 @@ appropriate content. For dates and timestamps, ensure logical chronology. Always
289
288
  across tables.
290
289
 
291
290
  When enriching existing data, carefully analyze the patterns and relationships in the existing columns \
292
- to generate compatible and realistic values for the missing columns.
293
- """
291
+ to generate compatible and realistic values for the missing columns."""
294
292
 
295
293
 
296
294
  def _create_table_prompt(
@@ -715,7 +713,7 @@ async def _worker(
715
713
  if do_repeat_task:
716
714
  # allow 10 retries across all workers before propagating the exception to the orchestrator
717
715
  await retry_queue.put(1)
718
- if retry_queue.qsize() < 10:
716
+ if retry_queue.qsize() <= 10:
719
717
  # put task back to the front of the batch queue
720
718
  await batch_queue.put((batch_idx, task))
721
719
  else:
@@ -1181,11 +1179,12 @@ def sample(
1181
1179
  or the enrichment of existing datasets with new, context-aware columns.
1182
1180
 
1183
1181
  It is particularly useful for quickly simulating production-like datasets for testing or prototyping purposes.
1184
- It is advised to limit mocking to small datasets for performance reasons (rows * cols < 100).
1182
+ It is advised to limit mocking to small datasets for performance reasons (rows * cols < 1000).
1185
1183
  It might take a couple of minutes for bigger datasets.
1186
1184
 
1187
1185
  Args:
1188
1186
  tables (dict[str, dict]): The table specifications to generate mock data for. See examples for usage.
1187
+ Note: Avoid using double quotes (`"`) and other special characters in column names.
1189
1188
  sample_size (int | dict[str, int]): The number of rows to generate for each subject table.
1190
1189
  If a single integer is provided, the same number of rows will be generated for each subject table.
1191
1190
  If a dictionary is provided, the number of rows to generate for each subject table can be specified individually.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mostlyai-mock
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary: Synthetic Mock Data
5
5
  Project-URL: homepage, https://github.com/mostly-ai/mostlyai-mock
6
6
  Project-URL: repository, https://github.com/mostly-ai/mostlyai-mock
@@ -24,13 +24,16 @@ Classifier: Programming Language :: Python :: 3.13
24
24
  Classifier: Topic :: Software Development :: Libraries
25
25
  Classifier: Typing :: Typed
26
26
  Requires-Python: >=3.10
27
- Requires-Dist: fastmcp<3.0.0,>=2.0.0
28
27
  Requires-Dist: litellm>=1.67.0
29
28
  Requires-Dist: numpy>=1.26.3
30
29
  Requires-Dist: pandas>=2.0.0
31
30
  Requires-Dist: pyarrow>=14.0.0
32
31
  Requires-Dist: pydantic<3.0.0,>=2.0.0
33
32
  Requires-Dist: tenacity>=9.1.2
33
+ Provides-Extra: litellm-proxy
34
+ Requires-Dist: litellm[proxy]>=1.67.0; extra == 'litellm-proxy'
35
+ Provides-Extra: mcp
36
+ Requires-Dist: fastmcp<3.0.0,>=2.0.0; extra == 'mcp'
34
37
  Description-Content-Type: text/markdown
35
38
 
36
39
  # Synthetic Mock Data 🔮
@@ -285,18 +288,18 @@ This repo comes with MCP Server. It can be easily consumed by any MCP Client by
285
288
 
286
289
  ```json
287
290
  {
288
- "mcpServers": {
289
- "mostlyai-mock-mcp": {
290
- "command": "uvx",
291
- "args": ["--from", "mostlyai-mock", "mcp-server"],
292
- "env": {
293
- "OPENAI_API_KEY": "PROVIDE YOUR KEY",
294
- "GEMINI_API_KEY": "PROVIDE YOUR KEY",
295
- "GROQ_API_KEY": "PROVIDE YOUR KEY",
296
- "ANTHROPIC_API_KEY": "PROVIDE YOUR KEY"
297
- }
298
- }
299
- }
291
+ "mcpServers": {
292
+ "mostlyai-mock-mcp": {
293
+ "command": "uvx",
294
+ "args": ["--from", "mostlyai-mock[mcp]", "mcp-server"],
295
+ "env": {
296
+ "OPENAI_API_KEY": "PROVIDE YOUR KEY",
297
+ "GEMINI_API_KEY": "PROVIDE YOUR KEY",
298
+ "GROQ_API_KEY": "PROVIDE YOUR KEY",
299
+ "ANTHROPIC_API_KEY": "PROVIDE YOUR KEY"
300
+ }
301
+ }
302
+ }
300
303
  }
301
304
  ```
302
305
 
@@ -306,5 +309,5 @@ For example:
306
309
 
307
310
  Troubleshooting:
308
311
  1. If the MCP Client fails to detect the MCP Server, provide the absolute path in the `command` field, for example: `/Users/johnsmith/.local/bin/uvx`
309
- 2. To debug MCP Server issues, you can use MCP Inspector by running: `npx @modelcontextprotocol/inspector -- uvx --from mostlyai-mock mcp-server`
310
- 3. In order to develop locally, modify the configuration by replacing `"command": "uv"` (or use the full path to `uv` if needed) and `"args": ["--directory", "/Users/johnsmith/mostlyai-mock", "run", "mcp-server"]`
312
+ 2. To debug MCP Server issues, you can use MCP Inspector by running: `npx @modelcontextprotocol/inspector -- uvx --from mostlyai-mock[mcp] mcp-server`
313
+ 3. In order to develop locally, modify the configuration by replacing `"command": "uv"` (or use the full path to `uv` if needed) and `"args": ["--directory", "/Users/johnsmith/mostlyai-mock", "run", "--extra", "mcp", "mcp-server"]`
@@ -0,0 +1,8 @@
1
+ mostlyai/mock/__init__.py,sha256=uv2DLnOleN6BNMfAMleXJCPcOZvM_tMTRy5njUIKDag,715
2
+ mostlyai/mock/core.py,sha256=JDJ9nVpRR2WochxumSdQS96zak0OV1frkJOwlQsPVBw,61715
3
+ mostlyai/mock/mcp_server.py,sha256=0Vn1jmrdNAvUZSviaaU7Lhn7L7iHFyd8kGFigM0-4s0,2367
4
+ mostlyai_mock-0.1.15.dist-info/METADATA,sha256=OG3NRdCcH2qycRQ5HrzyLtJwtl74lRw5Py1JtqfB2YI,14305
5
+ mostlyai_mock-0.1.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
+ mostlyai_mock-0.1.15.dist-info/entry_points.txt,sha256=XDbppUIAaCWW0nresVep8zb71pkzZuFA16jCBHq8CU8,61
7
+ mostlyai_mock-0.1.15.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
+ mostlyai_mock-0.1.15.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- mostlyai/mock/__init__.py,sha256=MLHwi5g6_lAEd8cDEISbVdRWmorOVAQ6IoMm8BsRpqg,715
2
- mostlyai/mock/core.py,sha256=JdWHix-Pp0s---b_Z3f2ui7J7LSl4_r_gPP0z8UHKY8,61663
3
- mostlyai/mock/mcp_server.py,sha256=0Vn1jmrdNAvUZSviaaU7Lhn7L7iHFyd8kGFigM0-4s0,2367
4
- mostlyai_mock-0.1.14.dist-info/METADATA,sha256=PHiUTSEvevYTPVvsMGT-kilTDwaEgIEL0T8Vr56PSiY,14123
5
- mostlyai_mock-0.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
6
- mostlyai_mock-0.1.14.dist-info/entry_points.txt,sha256=XDbppUIAaCWW0nresVep8zb71pkzZuFA16jCBHq8CU8,61
7
- mostlyai_mock-0.1.14.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
- mostlyai_mock-0.1.14.dist-info/RECORD,,