CSV#
Generate CSVs
- class linkml.generators.csvgen.CsvGenerator(schema: str | ~typing.TextIO | ~linkml_runtime.linkml_model.meta.SchemaDefinition | ~linkml.utils.generator.Generator | ~pathlib.Path, schemaview: ~linkml_runtime.utils.schemaview.SchemaView | None = None, format: str | None = None, metadata: bool = True, useuris: bool | None = None, log_level: int | None = 30, mergeimports: bool | None = True, source_file_date: str | None = None, source_file_size: int | None = None, logger: ~logging.Logger | None = None, verbose: bool | None = None, output: str | None = None, namespaces: ~linkml_runtime.utils.namespaces.Namespaces | None = None, directory_output: bool = False, base_dir: str | None = None, metamodel_name_map: ~typing.Dict[str, str] | None = None, importmap: str | ~typing.Mapping[str, str] | None = None, emit_prefixes: ~typing.Set[str] = <factory>, metamodel: ~linkml.utils.schemaloader.SchemaLoader | None = None, stacktrace: bool = False, include: str | ~pathlib.Path | ~linkml_runtime.linkml_model.meta.SchemaDefinition | None = None, sep: str | None = None, closure: ~typing.Set[~linkml_runtime.linkml_model.meta.ClassDefinitionName] | None = None, writer: ~csv.DictWriter | None = None, _str_io: ~_io.StringIO | None = None, **_kwargs)[source]#
Generates CSV summaries
Note: this generator is not widely used, and has largely been supplanted by schemasheets
- end_schema(**kwargs) str [source]#
Visited once at the end of generation
@param kwargs: Arguments passed through from CLI – implementation dependent
- generatorname: ClassVar[str] = 'csvgen.py'#
Name of the generator. Override with os.path.basename(__file__)
- generatorversion: ClassVar[str] = '0.1.1'#
Version of the generator. Consider deprecating and instead use overall linkml version
- uses_schemaloader: ClassVar[bool] = True#
Old-style generator that uses the SchemaLoader and visitor pattern
- visit_class(cls: ClassDefinition) bool [source]#
Visited once per schema class
@param cls: class being visited @return: Visit slots and end class. False means skip and go on
- visit_schema(classes: List[ClassDefinitionName] | None = None, **_) None [source]#
Visited once at the beginning of generation
@param kwargs: Arguments passed through from CLI – implementation dependent
- writer: DictWriter | None = None#
Python dictwriter