API reference¶
to_qif and write_qif, exported from bankstatementparser_writer_qif,
generated from the docstrings by mkdocstrings.
bankstatementparser_writer_qif.writer
¶
Structured Quicken Interchange Format (QIF) Writer.
to_qif(data, account_type='Bank', date_format='%Y-%m-%d')
¶
Serialise bank transactions to a Quicken Interchange Format (QIF) text string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Sequence[Transaction] | DataFrame | Sequence[Mapping[str, Any]] | Any
|
Transactions as DataFrame, Transaction list, or dict records. |
required |
account_type
|
str
|
QIF header type (default 'Bank', e.g. 'Bank', 'CCard', 'Cash'). |
'Bank'
|
date_format
|
str
|
Date format string for 'D' fields (default '%Y-%m-%d'). |
'%Y-%m-%d'
|
Returns:
| Type | Description |
|---|---|
str
|
Formatted QIF string. |
Source code in bankstatementparser_writer_qif/writer.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
write_qif(data, destination, account_type='Bank', date_format='%Y-%m-%d')
¶
Write transactions to a QIF file on disk.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Sequence[Transaction] | DataFrame | Sequence[Mapping[str, Any]] | Any
|
Transactions as DataFrame, Transaction list, or dict records. |
required |
destination
|
str | PathLike[str]
|
Path to write the output QIF file. |
required |
account_type
|
str
|
QIF header type (default 'Bank'). |
'Bank'
|
date_format
|
str
|
Date format string for 'D' fields. |
'%Y-%m-%d'
|
Returns:
| Type | Description |
|---|---|
Path
|
Path object pointing to the written file. |
Source code in bankstatementparser_writer_qif/writer.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |