mostlyai-mock 0.1.14__tar.gz → 0.1.15__tar.gz
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-0.1.14 → mostlyai_mock-0.1.15}/PKG-INFO +19 -16
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/README.md +14 -14
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/mostlyai/mock/__init__.py +1 -1
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/mostlyai/mock/core.py +9 -10
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/pyproject.toml +23 -9
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/.gitignore +0 -0
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/LICENSE +0 -0
- {mostlyai_mock-0.1.14 → mostlyai_mock-0.1.15}/mostlyai/mock/mcp_server.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mostlyai-mock
|
3
|
-
Version: 0.1.
|
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
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
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"]`
|
@@ -250,18 +250,18 @@ This repo comes with MCP Server. It can be easily consumed by any MCP Client by
|
|
250
250
|
|
251
251
|
```json
|
252
252
|
{
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
253
|
+
"mcpServers": {
|
254
|
+
"mostlyai-mock-mcp": {
|
255
|
+
"command": "uvx",
|
256
|
+
"args": ["--from", "mostlyai-mock[mcp]", "mcp-server"],
|
257
|
+
"env": {
|
258
|
+
"OPENAI_API_KEY": "PROVIDE YOUR KEY",
|
259
|
+
"GEMINI_API_KEY": "PROVIDE YOUR KEY",
|
260
|
+
"GROQ_API_KEY": "PROVIDE YOUR KEY",
|
261
|
+
"ANTHROPIC_API_KEY": "PROVIDE YOUR KEY"
|
262
|
+
}
|
263
|
+
}
|
264
|
+
}
|
265
265
|
}
|
266
266
|
```
|
267
267
|
|
@@ -271,5 +271,5 @@ For example:
|
|
271
271
|
|
272
272
|
Troubleshooting:
|
273
273
|
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`
|
274
|
-
2. To debug MCP Server issues, you can use MCP Inspector by running: `npx @modelcontextprotocol/inspector -- uvx --from mostlyai-mock mcp-server`
|
275
|
-
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"]`
|
274
|
+
2. To debug MCP Server issues, you can use MCP Inspector by running: `npx @modelcontextprotocol/inspector -- uvx --from mostlyai-mock[mcp] mcp-server`
|
275
|
+
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"]`
|
@@ -40,10 +40,10 @@ class LLMOutputFormat(str, Enum):
|
|
40
40
|
|
41
41
|
|
42
42
|
class LLMConfig(BaseModel):
|
43
|
-
model: str
|
44
|
-
api_key: str | None
|
45
|
-
temperature: float
|
46
|
-
top_p: float
|
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()
|
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 <
|
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
|
[project]
|
2
2
|
name = "mostlyai-mock"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.15"
|
4
4
|
description = "Synthetic Mock Data"
|
5
5
|
authors = [{ name = "MOSTLY AI", email = "dev@mostly.ai" }]
|
6
6
|
requires-python = ">=3.10"
|
@@ -29,17 +29,16 @@ dependencies = [
|
|
29
29
|
"pandas>=2.0.0",
|
30
30
|
"pyarrow>=14.0.0",
|
31
31
|
"litellm>=1.67.0",
|
32
|
-
"fastmcp>=2.0.0,<3.0.0",
|
33
32
|
"tenacity>=9.1.2",
|
34
33
|
]
|
35
34
|
|
36
|
-
[project.
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
[project.optional-dependencies]
|
36
|
+
litellm-proxy = [
|
37
|
+
"litellm[proxy]>=1.67.0",
|
38
|
+
]
|
39
|
+
mcp = [
|
40
|
+
"fastmcp>=2.0.0,<3.0.0",
|
41
|
+
]
|
43
42
|
|
44
43
|
[dependency-groups]
|
45
44
|
dev = [
|
@@ -60,8 +59,23 @@ docs = [
|
|
60
59
|
"black>=25.0",
|
61
60
|
]
|
62
61
|
|
62
|
+
[project.scripts]
|
63
|
+
mcp-server = "mostlyai.mock.mcp_server:main"
|
64
|
+
|
65
|
+
[project.urls]
|
66
|
+
homepage = "https://github.com/mostly-ai/mostlyai-mock"
|
67
|
+
repository = "https://github.com/mostly-ai/mostlyai-mock"
|
68
|
+
documentation = "https://mostly-ai.github.io/mostlyai-mock/"
|
69
|
+
|
63
70
|
[tool.uv]
|
64
71
|
default-groups = ["dev", "docs"]
|
72
|
+
conflicts = [
|
73
|
+
[
|
74
|
+
# fastmcp and litellm[proxy] have conflicting dependencies
|
75
|
+
{ extra = "litellm-proxy" },
|
76
|
+
{ extra = "mcp" },
|
77
|
+
]
|
78
|
+
]
|
65
79
|
|
66
80
|
[tool.hatch.build.targets.sdist]
|
67
81
|
include = ["mostlyai/mock"]
|
File without changes
|
File without changes
|
File without changes
|