Dialect¶
The Table Dialect model allows to manipulate a Pydantic model in Python according to the Table Dialect specification
Usage¶
from dplib.models import Dialect
dialect = Dialect()
dialect.delimiter = ';'
dialect.header = False
print(dialect.to_text(format="json"))
Reference¶
dplib.models.Dialect
¶
Bases: Model
Table Dialect model
Source code in dplib/models/dialect/dialect.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
commentChar: Optional[str] = None
class-attribute
instance-attribute
¶
Specifies a one-character string to use as the comment character.
commentRows: List[int] = []
class-attribute
instance-attribute
¶
This property specifies what rows have to be omitted from the data.
delimiter: str = ','
class-attribute
instance-attribute
¶
Specifies the character sequence which should separate fields (aka columns).
description: Optional[str] = None
class-attribute
instance-attribute
¶
A description of the dialect. The description MUST be markdown formatted — this also allows for simple plain text as plain text is itself valid markdown.
doubleQuote: bool = True
class-attribute
instance-attribute
¶
Controls the handling of quotes inside fields.
escapeChar: Optional[str] = None
class-attribute
instance-attribute
¶
Specifies a one-character string to use as the escape character.
header: bool = True
class-attribute
instance-attribute
¶
Specifies whether or not the file includes a header row.
headerJoin: str = ' '
class-attribute
instance-attribute
¶
This property specifies how multiline-header files have to join the resulting header rows.
headerRows: List[int] = []
class-attribute
instance-attribute
¶
This property specifies the row numbers for the header.
itemKeys: List[str] = []
class-attribute
instance-attribute
¶
This property specifies the way of extracting rows from data arrays with itemType is object.
itemType: Optional[IItemType] = None
class-attribute
instance-attribute
¶
This property specifies whether the data property contains an array of arrays or an array of objects.
lineTerminator: str = '\r\n'
class-attribute
instance-attribute
¶
Specifies the character sequence which should terminate rows.
nullSequence: Optional[str] = None
class-attribute
instance-attribute
¶
Specifies the character sequence which represents a null value.
profile: str = pydantic.Field(default=settings.PROFILE_CURRENT_DIALECT, alias='$schema')
class-attribute
instance-attribute
¶
A profile URL
property: Optional[str] = None
class-attribute
instance-attribute
¶
This property specifies where a data array is located in the data structure.
quoteChar: str = '"'
class-attribute
instance-attribute
¶
Specifies a one-character string to use as the quoting character.
sheetName: Optional[str] = None
class-attribute
instance-attribute
¶
This property specifies a sheet name of a table in the spreadsheet file.
sheetNumber: int = 1
class-attribute
instance-attribute
¶
This property specifies a sheet number of a table in the spreadsheet file.
skipInitialSpace: Optional[bool] = None
class-attribute
instance-attribute
¶
Specifies whether or not parsing will skip initial spaces after the delimiter.
title: Optional[str] = None
class-attribute
instance-attribute
¶
A string providing a title or one sentence description for this dialect