{"id":23503,"library":"data-designer","title":"data-designer","description":"A general framework for synthetic data generation in Python, version 0.5.9, released under an active development cadence. Provides classes and utilities for designing and generating realistic synthetic datasets.","status":"active","version":"0.5.9","language":"python","source_language":"en","source_url":"https://github.com/microsoft/data-designer","tags":["synthetic-data","data-generation","framework","python3"],"install":[{"cmd":"pip install data-designer","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Hyphen is not allowed in Python module names; use underscore.","wrong":"from data-designer import SyntheticDataGenerator","symbol":"SyntheticDataGenerator","correct":"from data_designer.generator import SyntheticDataGenerator"},{"note":"Module name uses underscore, not concatenation.","wrong":"from datadesigner.schema import DataSchema","symbol":"DataSchema","correct":"from data_designer.schema import DataSchema"}],"quickstart":{"code":"from data_designer.generator import SyntheticDataGenerator\nfrom data_designer.schema import DataSchema\n\nschema = DataSchema()\nschema.add_field(name='id', dtype='int', constraints={'unique': True})\nschema.add_field(name='name', dtype='str', constraints={'min_length': 3, 'max_length': 50})\ngenerator = SyntheticDataGenerator(schema, seed=42)\ndf = generator.generate(num_rows=100)\nprint(df.head())","lang":"python","description":"Minimal example: define a schema, create a generator, and generate 100 rows of synthetic data."},"warnings":[{"fix":"Update code to use 'add_field' and pass 'num_rows' to 'generate(num_rows=N)'.","message":"In version 0.5.x, the API changed: 'add_column' was renamed to 'add_field' and the 'num_rows' argument was moved from generator instantiation to the 'generate' method.","severity":"breaking","affected_versions":"<0.5.0"},{"fix":"Use 'import data_designer' (with underscore) instead of 'import data-designer'.","message":"The module name uses hyphens in PyPI but underscores in Python imports. Importing with a hyphen raises ModuleNotFoundError.","severity":"gotcha","affected_versions":"all"},{"fix":"Define the schema completely before passing it to SyntheticDataGenerator.","message":"The 'DataSchema' object is mutable; modifying fields after generator instantiation does not affect the generator. Changes must be made before creating the generator.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'import data_designer' or 'from data_designer import ...'.","cause":"Attempting to import with hyphen instead of underscore.","error":"ModuleNotFoundError: No module named 'data-designer'"},{"fix":"Pass num_rows to generator.generate(num_rows=N) instead.","cause":"In older versions (<0.5.0), num_rows was passed to the constructor. In 0.5.x+ it is moved to the generate method.","error":"TypeError: generate() got an unexpected keyword argument 'num_rows'"},{"fix":"Use schema.add_field(name, dtype, constraints) instead of schema.add_column(...).","cause":"Method renamed from 'add_column' to 'add_field' in version 0.5.0.","error":"AttributeError: 'DataSchema' object has no attribute 'add_column'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}