API Reference
Top-level entry point
- gsbparse.read_gsb(path)
Parse a Grisbi
.gsbfile into aGsbFile.The file must be a valid XML document whose root element is
<Grisbi>. Unknown element tags are logged atWARNINGlevel and skipped — the parser is tolerant by design so that files from future Grisbi versions can still be read partially.- Parameters:
path (
str|Path) – Filesystem path to the.gsbfile.- Return type:
- Returns:
A fully populated
GsbFile.- Raises:
InvalidGsbFileError – The file cannot be parsed as XML.
InvalidGsbFileRootError – The root element is not
<Grisbi>.
Domain objects
GsbFile
- class gsbparse.GsbFile(general, rgba, print_settings, currencies, accounts, banks, parties, payment_methods, transactions, scheduled, categories, sub_categories, budgetaries, sub_budgetaries, currency_links, financial_years, archives, reconciles, import_rules, special_lines, partial_balances, bet, bet_graphs, bet_historicals, bet_futures, bet_transferts, bet_loans, reports, text_comparisons, amount_comparisons)
The top-level aggregate for a parsed Grisbi
.gsbfile.Each field holds either:
None— the section is absent from the file (faithful distinction from an empty list, which means the section tag was present but empty).A single typed object (singleton sections such as
General).A
list[SectionClass](multi-entry sections).
See also
gsbparse.pandas.to_df()— convert sections or detailed transactions to apd.DataFrame.detailed_transactions— denormalized view with foreign keys resolved (added whenDetailedTransactionis introduced).- Parameters:
general (
General|None)rgba (
Rgba|None)print_settings (
Print|None)currencies (
list[Currency] |None)accounts (
list[Account] |None)banks (
list[Bank] |None)parties (
list[Party] |None)payment_methods (
list[Payment] |None)transactions (
list[Transaction] |None)scheduled (
list[Scheduled] |None)categories (
list[Category] |None)sub_categories (
list[SubCategory] |None)budgetaries (
list[Budgetary] |None)sub_budgetaries (
list[SubBudgetary] |None)currency_links (
list[CurrencyLink] |None)financial_years (
list[FinancialYear] |None)archives (
list[Archive] |None)reconciles (
list[Reconcile] |None)import_rules (
list[ImportRule] |None)special_lines (
list[SpecialLine] |None)partial_balances (
list[PartialBalance] |None)bet (
Bet|None)bet_graphs (
list[BetGraph] |None)bet_historicals (
list[BetHistorical] |None)bet_futures (
list[BetFuture] |None)bet_transferts (
list[BetTransfert] |None)bet_loans (
list[BetLoan] |None)reports (
list[Report] |None)text_comparisons (
list[TextComparison] |None)amount_comparisons (
list[AmountComparison] |None)
- transactions: list[Transaction] | None
- sub_categories: list[SubCategory] | None
- sub_budgetaries: list[SubBudgetary] | None
- currency_links: list[CurrencyLink] | None
- financial_years: list[FinancialYear] | None
- import_rules: list[ImportRule] | None
- special_lines: list[SpecialLine] | None
- partial_balances: list[PartialBalance] | None
- bet_historicals: list[BetHistorical] | None
- bet_transferts: list[BetTransfert] | None
- text_comparisons: list[TextComparison] | None
- amount_comparisons: list[AmountComparison] | None
- property detailed_transactions: list[DetailedTransaction] | None
Transactions with all foreign keys resolved to domain objects.
Returns
Nonewhen the file contains no transactions. Accounts or currencies missing from the file cause the affected transaction to be skipped with aWARNINGlog entry.
DetailedTransaction
- class gsbparse.DetailedTransaction(Nb, Id, Dt, Dv, Am, Exb, Exr, Exf, Br, No, Pc, Vo, Ba, Au, Ma, Ar, Mo, Ac, Cu, Pa, Ca, Sca, Pn, Re, Fi, Bu, Sbu, Trt)
A transaction with every foreign-key field resolved to its domain object.
Fields mirror
Transactionbut integer FK identifiers are replaced by the referenced section instances (orNonewhen the FK is zero / not present in the file).- Nb
Transaction number (primary key within the account).
- Id
OFX transaction identifier (nullable).
- Dt
Transaction date (nullable).
- Dv
Value date (nullable).
- Am
Amount (positive = credit, negative = debit).
- Exb
Exchange-rate flag.
- Exr
Exchange rate.
- Exf
Exchange fee.
- Br
Breakdown flag (True for parent split transactions).
- No
Free-text notes (nullable).
- Pc
Payment method content / cheque number (nullable).
- Vo
Voucher reference (nullable).
- Ba
Bank reference (nullable).
- Au
Automatic transaction flag.
- Ac
Account this transaction belongs to.
- Cu
Currency of this transaction.
- Pa
Payee / party (None when unset).
- Ca
Category (None when unset).
- Sca
Sub-category (None when unset).
- Pn
Payment method (None when unset).
- Ma
Marked / reconciliation state.
- Ar
Archive this transaction belongs to (identifier; not resolved).
- Re
Reconcile record (None when unset).
- Fi
Financial year (None when unset).
- Bu
Budget line (None when unset).
- Sbu
Sub-budget line (None when unset).
- Trt
Paired contra-transaction for transfers (None when not a transfer or contra not found). The nested object’s own
Trtis alwaysNoneto prevent infinite nesting.
- Mo
Mother transaction number for breakdown children (0 = top-level).
- Parameters:
Nb (
int)Id (
str|None)Dt (
date|None)Dv (
date|None)Am (
Decimal)Exb (
bool)Exr (
Decimal)Exf (
Decimal)Br (
bool)No (
str|None)Pc (
str|None)Vo (
str|None)Ba (
str|None)Au (
bool)Ma (
TransactionMarkedState)Ar (
int)Mo (
int)Ac (
DetailedAccount)Cu (
Currency)Pa (
Party|None)Ca (
Category|None)Sca (
DetailedSubCategory|None)Pn (
Payment|None)Re (
DetailedReconcile|None)Fi (
FinancialYear|None)Bu (
Budgetary|None)Sbu (
DetailedSubBudgetary|None)Trt (
DetailedTransaction|None)
- Nb: int
- Id: str | None
- Dt: date | None
- Dv: date | None
- Am: Decimal
- Exb: bool
- Exr: Decimal
- Exf: Decimal
- Br: bool
- No: str | None
- Pc: str | None
- Vo: str | None
- Ba: str | None
- Au: bool
- Ma: TransactionMarkedState
- Ar: int
- Mo: int
- Ac: DetailedAccount
- Sca: DetailedSubCategory | None
- Re: DetailedReconcile | None
- Fi: FinancialYear | None
- Sbu: DetailedSubBudgetary | None
- Trt: DetailedTransaction | None
DetailedTransactionColumn
- class gsbparse.DetailedTransactionColumn(path, output_name)
Specification for one column in a detailed-transactions DataFrame.
- path
Dotted attribute path on
DetailedTransaction, e.g."Ac.Na"or"Am".
- output_name
Column name in the output
pd.DataFrame, e.g."account"or"amount".
- Parameters:
path (
str)output_name (
str)
- path: str
- output_name: str
Section classes
All section classes are frozen dataclasses. Field names mirror the Grisbi format spec attribute codes.
- class gsbparse.Account(Name, Id, Number, Owner, Kind, Currency, Path_icon, Bank, Bank_branch_code, Bank_account_number, Key, Bank_account_IBAN, Initial_balance, Minimum_wanted_balance, Minimum_authorised_balance, Closed_account, Show_marked, Show_archives_lines, Lines_per_transaction, Comment, Owner_address, Default_debit_method, Default_credit_method, Sort_by_method, Neutrals_inside_method, Sort_order, Ascending_sort, Column_sort, Sorting_kind_column, Bet_use_budget)
A bank or cash account defined in the Grisbi file.
Budget-estimate fields (
Bet_*) are present only whenBet_use_budget >= 1; they areNoneotherwise.- Name
Account display name.
- Id
OFX account identifier (nullable).
- Number
Account number (internal).
- Owner
Account holder name.
- Kind
Account kind (checking / cash / liability / asset).
- Currency
Currency identifier.
- Path_icon
Path to the account icon file.
- Bank
Bank identifier (0 = none).
- Bank_branch_code
Bank branch code.
- Bank_account_number
Bank account number string.
- Key
Account key / check digit.
- Bank_account_IBAN
IBAN string.
- Initial_balance
Opening balance.
- Minimum_wanted_balance
Target minimum balance.
- Minimum_authorised_balance
Authorised overdraft limit.
- Closed_account
Account is closed.
- Show_marked
Show only marked transactions by default.
- Show_archives_lines
Show archived transaction lines.
- Lines_per_transaction
Number of display lines per transaction.
- Comment
Free-text comment.
- Owner_address
Account holder address.
- Default_debit_method
Default payment method for debits.
- Default_credit_method
Default payment method for credits.
- Sort_by_method
Sort transactions by payment method.
- Neutrals_inside_method
Group neutral transactions inside method sort.
- Sort_order
Sort order specification string.
- Ascending_sort
Sort ascending.
- Column_sort
Column index used for sorting.
- Sorting_kind_column
Column-sort kind specification string.
- Bet_use_budget
Budget-estimate enabled (0 = off, ≥1 = on).
- Parameters:
Name (
str)Id (
str|None)Number (
int)Owner (
str)Kind (
AccountKind)Currency (
int)Path_icon (
str)Bank (
int)Bank_branch_code (
str)Bank_account_number (
str)Key (
str)Bank_account_IBAN (
str)Initial_balance (
Decimal)Minimum_wanted_balance (
Decimal)Minimum_authorised_balance (
Decimal)Closed_account (
bool)Show_marked (
bool)Show_archives_lines (
bool)Lines_per_transaction (
int)Comment (
str)Owner_address (
str)Default_debit_method (
int)Default_credit_method (
int)Sort_by_method (
bool)Neutrals_inside_method (
bool)Sort_order (
str)Ascending_sort (
bool)Column_sort (
int)Sorting_kind_column (
str)Bet_use_budget (
int)
- Name: str
- Id: str | None
- Number: int
- Owner: str
- Kind: AccountKind
- Currency: int
- Path_icon: str
- Bank: int
- Bank_branch_code: str
- Bank_account_number: str
- Key: str
- Bank_account_IBAN: str
- Initial_balance: Decimal
- Minimum_wanted_balance: Decimal
- Minimum_authorised_balance: Decimal
- Closed_account: bool
- Show_marked: bool
- Show_archives_lines: bool
- Lines_per_transaction: int
- Comment: str
- Owner_address: str
- Default_debit_method: int
- Default_credit_method: int
- Sort_by_method: bool
- Neutrals_inside_method: bool
- Sort_order: str
- Ascending_sort: bool
- Column_sort: int
- Sorting_kind_column: str
- Bet_use_budget: int
- class gsbparse.Currency(Nb, Na, Co, Ico, Fl)
A currency defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Human-readable name (e.g.
"Euro").
- Co
Symbol (e.g.
"€").
- Ico
ISO 4217 code (e.g.
"EUR").
- Fl
Number of decimal digits (fraction digits).
- Parameters:
Nb (
int)Na (
str)Co (
str)Ico (
str)Fl (
int)
- Nb: int
- Na: str
- Co: str
- Ico: str
- Fl: int
- class gsbparse.Transaction(Ac, Nb, Id, Dt, Dv, Am, Cu, Exb, Exr, Exf, Pa, Ca, Sca, Br, No, Pn, Pc, Ma, Ar, Au, Re, Fi, Bu, Sbu, Vo, Ba, Trt, Mo)
A transaction stored in the Grisbi file.
Foreign-key fields (
Ac,Cu,Pa, etc.) hold raw integer identifiers as they appear in the XML. Resolved, typed references live onDetailedTransaction.- Ac
Account identifier.
- Nb
Transaction number (unique within the account).
- Id
OFX import identifier (nullable).
- Dt
Transaction date (nullable).
- Dv
Value date (nullable).
- Am
Amount (negative = debit).
- Cu
Currency identifier.
- Exb
Exchange direction flag (1 = 1 account_currency = rate x amount).
- Exr
Exchange rate.
- Exf
Exchange fees.
- Pa
Party identifier.
- Ca
Category identifier.
- Sca
Sub-category identifier.
- Br
Breakdown flag (1 = this is a parent split transaction).
- No
Notes (nullable).
- Pn
Payment method identifier.
- Pc
Payment method content / reference (nullable).
- Ma
Marked / reconciliation state.
- Ar
Archive identifier (0 = not archived).
- Au
Automatic transaction (0 = manual, 1 = from scheduled).
- Re
Reconcile identifier (0 = not reconciled).
- Fi
Financial year identifier.
- Bu
Budget line identifier.
- Sbu
Sub-budget line identifier.
- Vo
Voucher reference (nullable).
- Ba
Bank reference (nullable).
- Trt
Transfer transaction number (0 = not a transfer).
- Mo
Mother transaction number for breakdown children (0 = top-level).
- Parameters:
Ac (
int)Nb (
int)Id (
str|None)Dt (
date|None)Dv (
date|None)Am (
Decimal)Cu (
int)Exb (
bool)Exr (
Decimal)Exf (
Decimal)Pa (
int)Ca (
int)Sca (
int)Br (
bool)No (
str|None)Pn (
int)Pc (
str|None)Ma (
TransactionMarkedState)Ar (
int)Au (
bool)Re (
int)Fi (
int)Bu (
int)Sbu (
int)Vo (
str|None)Ba (
str|None)Trt (
int)Mo (
int)
- Ac: int
- Nb: int
- Id: str | None
- Dt: date | None
- Dv: date | None
- Am: Decimal
- Cu: int
- Exb: bool
- Exr: Decimal
- Exf: Decimal
- Pa: int
- Ca: int
- Sca: int
- Br: bool
- No: str | None
- Pn: int
- Pc: str | None
- Ma: TransactionMarkedState
- Ar: int
- Au: bool
- Re: int
- Fi: int
- Bu: int
- Sbu: int
- Vo: str | None
- Ba: str | None
- Trt: int
- Mo: int
- class gsbparse.Party(Nb, Na, Txt, Search, IgnCase, UseRegex)
A party (payee or payer) defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Display name.
- Txt
Description / notes (nullable).
- Search
Import-matching search string (nullable).
- IgnCase
Ignore case when matching the search string.
- UseRegex
Treat the search string as a regular expression.
- Parameters:
Nb (
int)Na (
str)Txt (
str|None)Search (
str|None)IgnCase (
bool)UseRegex (
bool)
- Nb: int
- Na: str
- Txt: str | None
- Search: str | None
- IgnCase: bool
- UseRegex: bool
- class gsbparse.Category(Nb, Na, Kd)
A transaction category defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Display name.
- Kd
Kind (expense or income).
- Parameters:
Nb (
int)Na (
str)Kd (
CategoryKind)
- Nb: int
- Na: str
- Kd: CategoryKind
- class gsbparse.SubCategory(Nbc, Nb, Na)
A transaction sub-category defined in the Grisbi file.
- Nbc
Parent category identifier.
- Nb
Unique identifier within the parent category.
- Na
Display name.
- Parameters:
Nbc (
int)Nb (
int)Na (
str)
- Nbc: int
- Nb: int
- Na: str
- class gsbparse.Budgetary(Nb, Na, Kd)
A top-level budget line defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Display name.
- Kd
Kind (expense or income).
- Parameters:
Nb (
int)Na (
str)Kd (
CategoryKind)
- Nb: int
- Na: str
- Kd: CategoryKind
- class gsbparse.SubBudgetary(Nbb, Nb, Na)
A budget sub-line defined in the Grisbi file.
- Nbb
Parent budgetary identifier.
- Nb
Unique identifier within the parent budget line.
- Na
Display name.
- Parameters:
Nbb (
int)Nb (
int)Na (
str)
- Nbb: int
- Nb: int
- Na: str
- class gsbparse.General(File_version, Grisbi_version, Crypt_file, Archive_file, File_title, Use_icons_file_dir, General_address, Second_general_address, Date_format, Decimal_point, Thousands_separator, Party_list_currency_number, Category_list_currency_number, Budget_list_currency_number, Navigation_list_order, Scheduler_view, Scheduler_custom_number, Scheduler_custom_menu, Scheduler_set_default_account, Scheduler_default_account_number, Scheduler_set_fixed_date, Scheduler_default_fixed_date, Import_interval_search, Import_ope_nbre_max, Import_copy_payee_in_note, Import_extract_number_for_check, Import_fusion_transactions, Import_categorie_for_payee, Import_fyear_by_value_date, Import_qif_no_import_categories, Import_qif_use_field_extract_method_payment, Export_file_format, Export_files_traitement, Export_force_US_dates, Export_force_US_numbers, Export_quote_dates, Form_date_force_prev_year, Form_columns_number, Form_lines_number, Form_organization, Form_columns_width, Reconcile_end_date, Reconcile_sort, Use_logo, Name_logo, Remind_display_per_account, Transactions_view, One_line_showed, Two_lines_showed, Three_lines_showed, Transaction_column_width, Transaction_column_align, Scheduler_column_width, Combofix_mixed_sort, Combofix_case_sensitive, Combofix_force_payee, Combofix_force_category, Automatic_amount_separator, CSV_separator, CSV_force_date_valeur_with_date, Metatree_assoc_mode, Metatree_sort_transactions, Metatree_unarchived_payees, Add_archive_in_total_balance, Force_credit_before_debit, Bet_array_column_width, Bet_capital, Bet_currency, Bet_taux_annuel, Bet_index_duree, Bet_frais, Bet_type_taux)
Global settings stored at the top of a Grisbi file.
Attribute names follow the XML attribute names from the file exactly, except that hyphenated XML names (
Import-ope-nbre-max,Force-credit-before-debit,Archive-force-unreconciled) are represented with underscores. The XML adapter maps them accordingly.- File_version
Grisbi file format version string.
- Grisbi_version
Grisbi application version string.
- Crypt_file
File is encrypted.
- Archive_file
File is an archive.
- File_title
Title of the file (displayed in the UI).
- Use_icons_file_dir
Account icons are in the file’s
icon/subdir.
- General_address
Owner address line 1 (nullable).
- Second_general_address
Owner address line 2 (nullable).
- Date_format
strftime-style date format used in the file.
- Decimal_point
Decimal separator character.
- Thousands_separator
Thousands separator character.
- Party_list_currency_number
Currency used in the party list.
- Category_list_currency_number
Currency used in the category list.
- Budget_list_currency_number
Currency used in the budget list.
Dash-separated navigation panel order.
- Scheduler_view
Scheduler display mode.
- Scheduler_custom_number
Custom scheduler period count.
Custom scheduler period unit menu index.
- Scheduler_set_default_account
Use a fixed default account for scheduler.
- Scheduler_default_account_number
Default account identifier for scheduler.
- Scheduler_set_fixed_date
Use a fixed date offset for scheduler.
- Scheduler_default_fixed_date
Fixed date offset for scheduler.
- Import_interval_search
Days to search around a transaction date on import.
- Import_ope_nbre_max
Maximum number of transactions to import (0 = unlimited).
- Import_copy_payee_in_note
Copy payee name into notes on import.
- Import_extract_number_for_check
Extract a cheque number from the payee field.
- Import_fusion_transactions
Try to merge duplicate transactions on import.
- Import_categorie_for_payee
Auto-assign category from payee on import.
- Import_fyear_by_value_date
Assign financial year by value date on import.
- Import_qif_no_import_categories
Skip categories when importing QIF files.
- Import_qif_use_field_extract_method_payment
Use field extraction for QIF payment method.
- Export_file_format
Default export format.
- Export_files_traitement
Post-process exported files.
- Export_force_US_dates
Force US date format (MM/DD/YYYY) in exports.
- Export_force_US_numbers
Force US number format in exports.
- Export_quote_dates
Quote dates with double quotes in exports.
- Form_date_force_prev_year
Force previous year when entering dates in December.
- Form_columns_number
Number of columns in the transaction entry form.
- Form_lines_number
Number of lines in the transaction entry form.
- Form_organization
Form-field layout specification string.
- Form_columns_width
Dash-separated form column widths.
- Reconcile_end_date
Show end date in reconciliation.
- Reconcile_sort
Sort transactions during reconciliation.
- Use_logo
Display a custom logo.
- Name_logo
Path to the logo file (nullable).
- Remind_display_per_account
Show balance reminders per account.
- Transactions_view
Dash-separated column visibility specification.
- One_line_showed
Show one line per transaction.
- Two_lines_showed
Show two lines per transaction.
- Three_lines_showed
Show three lines per transaction.
- Transaction_column_width
Dash-separated transaction column widths.
- Transaction_column_align
Dash-separated transaction column alignment flags.
- Scheduler_column_width
Dash-separated scheduler column widths.
- Combofix_mixed_sort
Mix expense/income entries in combo boxes.
- Combofix_case_sensitive
Case-sensitive combo box matching.
- Combofix_force_payee
Force payee completion in combo boxes.
- Combofix_force_category
Force category completion in combo boxes.
- Automatic_amount_separator
Insert decimal separator automatically.
- CSV_separator
CSV field separator character.
- CSV_force_date_valeur_with_date
Fill value date from transaction date in CSV export.
- Metatree_assoc_mode
Metatree association mode.
- Metatree_sort_transactions
Metatree transaction sort mode.
- Metatree_unarchived_payees
Show unarchived payees in metatree.
- Add_archive_in_total_balance
Include archived transactions in total balance.
- Force_credit_before_debit
Show credit before debit.
- Bet_array_column_width
Dash-separated budget-estimate column widths.
- Bet_capital
Loan capital.
- Bet_currency
Loan currency identifier.
- Bet_taux_annuel
Annual loan interest rate.
- Bet_index_duree
Duration index.
- Bet_frais
Loan fees.
- Bet_type_taux
Interest rate type.
- Parameters:
File_version (
str)Grisbi_version (
str)Crypt_file (
bool)Archive_file (
bool)File_title (
str)Use_icons_file_dir (
bool)General_address (
str|None)Second_general_address (
str|None)Date_format (
str)Decimal_point (
str)Thousands_separator (
str)Party_list_currency_number (
int)Category_list_currency_number (
int)Budget_list_currency_number (
int)Navigation_list_order (
str)Scheduler_view (
int)Scheduler_custom_number (
int)Scheduler_custom_menu (
int)Scheduler_set_default_account (
bool)Scheduler_default_account_number (
int)Scheduler_set_fixed_date (
bool)Scheduler_default_fixed_date (
int)Import_interval_search (
int)Import_ope_nbre_max (
int|None)Import_copy_payee_in_note (
bool)Import_extract_number_for_check (
bool)Import_fusion_transactions (
bool)Import_categorie_for_payee (
bool)Import_fyear_by_value_date (
bool)Import_qif_no_import_categories (
bool)Import_qif_use_field_extract_method_payment (
bool)Export_file_format (
int)Export_files_traitement (
bool)Export_force_US_dates (
bool)Export_force_US_numbers (
bool)Export_quote_dates (
bool)Form_date_force_prev_year (
bool)Form_columns_number (
int)Form_lines_number (
int)Form_organization (
str)Form_columns_width (
str|None)Reconcile_end_date (
bool)Reconcile_sort (
bool)Use_logo (
bool)Name_logo (
str|None)Remind_display_per_account (
bool)Transactions_view (
str)One_line_showed (
bool|None)Two_lines_showed (
bool)Three_lines_showed (
bool)Transaction_column_width (
str)Transaction_column_align (
str)Scheduler_column_width (
str)Combofix_mixed_sort (
bool)Combofix_case_sensitive (
bool)Combofix_force_payee (
bool)Combofix_force_category (
bool)Automatic_amount_separator (
bool)CSV_separator (
str)CSV_force_date_valeur_with_date (
bool)Metatree_assoc_mode (
int|None)Metatree_sort_transactions (
int)Metatree_unarchived_payees (
bool)Add_archive_in_total_balance (
bool)Force_credit_before_debit (
bool|None)Bet_array_column_width (
str)Bet_capital (
Decimal)Bet_currency (
int)Bet_taux_annuel (
Decimal)Bet_index_duree (
int)Bet_frais (
Decimal)Bet_type_taux (
int)
- File_version: str
- Grisbi_version: str
- Crypt_file: bool
- Archive_file: bool
- File_title: str
- Use_icons_file_dir: bool
- General_address: str | None
- Second_general_address: str | None
- Date_format: str
- Decimal_point: str
- Thousands_separator: str
- Party_list_currency_number: int
- Category_list_currency_number: int
- Budget_list_currency_number: int
- Navigation_list_order: str
- Scheduler_view: int
- Scheduler_custom_number: int
- Scheduler_custom_menu: int
- Scheduler_set_default_account: bool
- Scheduler_default_account_number: int
- Scheduler_set_fixed_date: bool
- Scheduler_default_fixed_date: int
- Import_interval_search: int
- Import_ope_nbre_max: int | None
- Import_copy_payee_in_note: bool
- Import_extract_number_for_check: bool
- Import_fusion_transactions: bool
- Import_categorie_for_payee: bool
- Import_fyear_by_value_date: bool
- Import_qif_no_import_categories: bool
- Import_qif_use_field_extract_method_payment: bool
- Export_file_format: int
- Export_files_traitement: bool
- Export_force_US_dates: bool
- Export_force_US_numbers: bool
- Export_quote_dates: bool
- Form_date_force_prev_year: bool
- Form_columns_number: int
- Form_lines_number: int
- Form_organization: str
- Form_columns_width: str | None
- Reconcile_end_date: bool
- Reconcile_sort: bool
- Use_logo: bool
- Name_logo: str | None
- Remind_display_per_account: bool
- Transactions_view: str
- One_line_showed: bool | None
- Two_lines_showed: bool
- Three_lines_showed: bool
- Transaction_column_width: str
- Transaction_column_align: str
- Scheduler_column_width: str
- Combofix_mixed_sort: bool
- Combofix_case_sensitive: bool
- Combofix_force_payee: bool
- Combofix_force_category: bool
- Automatic_amount_separator: bool
- CSV_separator: str
- CSV_force_date_valeur_with_date: bool
- Metatree_assoc_mode: int | None
- Metatree_sort_transactions: int
- Metatree_unarchived_payees: bool
- Add_archive_in_total_balance: bool
- Force_credit_before_debit: bool | None
- Bet_array_column_width: str
- Bet_capital: Decimal
- Bet_currency: int
- Bet_taux_annuel: Decimal
- Bet_index_duree: int
- Bet_frais: Decimal
- Bet_type_taux: int
- class gsbparse.Bank(Nb, Na, Co, BIC, Adr, Tel, Mail, Web, Nac, Faxc, Telc, Mailc, Rem)
A bank defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Bank name.
- Co
Bank code.
- BIC
BIC/SWIFT code.
- Adr
Address.
- Tel
Phone number.
- Mail
E-mail address (nullable).
- Web
Website URL (nullable).
- Nac
Contact name.
- Faxc
Contact fax.
- Telc
Contact phone.
- Mailc
Contact e-mail.
- Rem
Remarks (nullable).
- Parameters:
Nb (
int)Na (
str)Co (
str)BIC (
str)Adr (
str)Tel (
str)Mail (
str|None)Web (
str|None)Nac (
str)Faxc (
str)Telc (
str)Mailc (
str)Rem (
str|None)
- Nb: int
- Na: str
- Co: str
- BIC: str
- Adr: str
- Tel: str
- Mail: str | None
- Web: str | None
- Nac: str
- Faxc: str
- Telc: str
- Mailc: str
- Rem: str | None
- class gsbparse.Payment(Number, Name, Sign, Show_entry, Automatic_number, Current_number, Account)
A payment method defined in the Grisbi file.
- Number
Unique identifier.
- Name
Display name.
- Sign
Sign convention (1 = debit, -1 = credit, 0 = neutral).
- Show_entry
Show a free-text entry field in the transaction form.
- Automatic_number
Auto-increment the payment reference number.
- Current_number
Current auto-increment value (
NonewhenAutomatic_numberis off).
- Account
Account identifier this method is attached to (0 = global).
- Parameters:
Number (
int)Name (
str)Sign (
int)Show_entry (
bool)Automatic_number (
bool)Current_number (
int|None)Account (
int)
- Number: int
- Name: str
- Sign: int
- Show_entry: bool
- Automatic_number: bool
- Current_number: int | None
- Account: int
- class gsbparse.Reconcile(Nb, Na, Acc, Idate, Fdate, Ibal, Fbal)
A reconciliation record defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Display name (e.g.
"2007-1").
- Acc
Account identifier this reconciliation belongs to.
- Idate
Start date of the reconciliation period (nullable).
- Fdate
End date of the reconciliation period (nullable).
- Ibal
Opening balance.
- Fbal
Closing balance.
- Parameters:
Nb (
int)Na (
str)Acc (
int)Idate (
date|None)Fdate (
date|None)Ibal (
Decimal)Fbal (
Decimal)
- Nb: int
- Na: str
- Acc: int
- Idate: date | None
- Fdate: date | None
- Ibal: Decimal
- Fbal: Decimal
- class gsbparse.Scheduled(Nb, Dt, Ac, Am, Cu, Pa, Ca, Sca, Tra, Pn, CPn, Pc, Fi, Bu, Sbu, No, Au, Fd, Pe, Pei, Pep, Dtl, Br, Mo)
A scheduled (recurring) transaction defined in the Grisbi file.
- Nb
Scheduled transaction number.
- Dt
Next occurrence date (nullable).
- Ac
Account identifier.
- Am
Amount.
- Cu
Currency identifier.
- Pa
Party identifier.
- Ca
Category identifier.
- Sca
Sub-category identifier.
- Tra
Transfer target account identifier.
- Pn
Payment method identifier.
- CPn
Counter-payment method identifier.
- Pc
Payment method content (nullable).
- Fi
Financial year identifier (-2 = current year).
- Bu
Budget line identifier.
- Sbu
Sub-budget line identifier.
- No
Notes (nullable).
- Au
Automatic execution flag.
- Fd
Fixed day of month (0 = none, 28-31 = fixed day; 31 = last day).
- Pe
Periodicity.
- Pei
Periodicity interval.
- Pep
Custom periodicity value.
- Dtl
Limit date (nullable).
- Br
Breakdown flag.
- Mo
Mother transaction number for breakdown children.
- Parameters:
Nb (
int)Dt (
date|None)Ac (
int)Am (
Decimal)Cu (
int)Pa (
int)Ca (
int)Sca (
int)Tra (
int)Pn (
int)CPn (
int)Pc (
str|None)Fi (
int)Bu (
int)Sbu (
int)No (
str|None)Au (
bool)Fd (
int)Pe (
int)Pei (
int)Pep (
int)Dtl (
date|None)Br (
bool)Mo (
int)
- Nb: int
- Dt: date | None
- Ac: int
- Am: Decimal
- Cu: int
- Pa: int
- Ca: int
- Sca: int
- Tra: int
- Pn: int
- CPn: int
- Pc: str | None
- Fi: int
- Bu: int
- Sbu: int
- No: str | None
- Au: bool
- Fd: int
- Pe: int
- Pei: int
- Pep: int
- Dtl: date | None
- Br: bool
- Mo: int
- class gsbparse.FinancialYear(Nb, Na, Bdte, Edte, Sho)
A financial year defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Display name (e.g.
"2007").
- Bdte
Begin date (nullable).
- Edte
End date (nullable).
- Sho
Show this financial year in the UI.
- Parameters:
Nb (
int)Na (
str)Bdte (
date|None)Edte (
date|None)Sho (
bool)
- Nb: int
- Na: str
- Bdte: date | None
- Edte: date | None
- Sho: bool
- class gsbparse.Archive(Nb, Na, Bdte, Edte, Fye, Rep)
An archive group defined in the Grisbi file.
Archives compress old transactions into a single summary entry. An archive is either date-bounded (
Bdte/Edteset) or financial-year-bounded (Fyeset); the other fields areNone.- Nb
Unique identifier.
- Na
Display name.
- Bdte
Begin date of the archived period (nullable).
- Edte
End date of the archived period (nullable).
- Fye
Financial year identifier for year-based archives (0 = not set).
- Rep
Report path (nullable).
- Parameters:
Nb (
int)Na (
str)Bdte (
date|None)Edte (
date|None)Fye (
int)Rep (
str|None)
- Nb: int
- Na: str
- Bdte: date | None
- Edte: date | None
- Fye: int
- Rep: str | None
- class gsbparse.CurrencyLink(Nb, Cu1, Cu2, Ex, Fl)
An exchange-rate link between two currencies.
- Nb
Unique identifier.
- Cu1
First currency identifier.
- Cu2
Second currency identifier.
- Ex
Exchange rate (Cu1 → Cu2).
- Fl
Fixed link —
Truemeans the rate is pegged (e.g. CFA franc).
- Parameters:
Nb (
int)Cu1 (
int)Cu2 (
int)Ex (
Decimal)Fl (
bool)
- Nb: int
- Cu1: int
- Cu2: int
- Ex: Decimal
- Fl: bool
- class gsbparse.ImportRule(Nb, Na, Acc, Cur, Inv, Enc, Fil, Act, Typ, IdC, IdR, FiS, Fld, Hp, Sep, SkiS, SpL)
An import rule for automatic transaction import.
- Nb
Rule number.
- Na
Rule name.
- Acc
Account number concerned.
- Cur
Currency identifier for the rule.
- Inv
Invert the transaction amount.
- Enc
Character encoding of the import file.
- Fil
Last file used.
- Act
Action (import or mark transactions).
- Typ
File type (
"OFX","CSV","QIF").
- IdC
Column index of the account name (1-based).
- IdR
Row index of the account name (1-based).
- FiS
Grisbi field-to-column mapping string.
- Fld
First data row (including header row if present, 1-based).
- Hp
Header row present (1 = yes).
- Sep
CSV field separator.
- SkiS
Skip-lines specification string.
- SpL
Number of special lines in the rule.
- Parameters:
Nb (
int)Na (
str)Acc (
int)Cur (
int)Inv (
bool)Enc (
str)Fil (
str)Act (
int)Typ (
str)IdC (
int)IdR (
int)FiS (
str)Fld (
int)Hp (
bool)Sep (
str)SkiS (
str)SpL (
int)
- Nb: int
- Na: str
- Acc: int
- Cur: int
- Inv: bool
- Enc: str
- Fil: str
- Act: int
- Typ: str
- IdC: int
- IdR: int
- FiS: str
- Fld: int
- Hp: bool
- Sep: str
- SkiS: str
- SpL: int
- class gsbparse.PartialBalance(Nb, Na, Acc, Kind, Currency, Colorise)
A partial (grouped) balance defined in the Grisbi file.
- Nb
Unique identifier.
- Na
Display name.
- Acc
Semicolon-separated list of account identifiers included.
- Kind
Balance kind.
- Currency
Currency identifier for the displayed balance.
- Colorise
Show negative balances in red.
- Parameters:
Nb (
int)Na (
str)Acc (
str)Kind (
int)Currency (
int)Colorise (
bool)
- Nb: int
- Na: str
- Acc: str
- Kind: int
- Currency: int
- Colorise: bool
- class gsbparse.Report(Nb, Name, Compl_name_function, Compl_name_position, Compl_name_used, General_sort_type, Show_r, Show_transaction, Show_transaction_amount, Show_transaction_nb, Show_transaction_date, Show_transaction_payee, Show_transaction_categ, Show_transaction_sub_categ, Show_transaction_payment, Show_transaction_budget, Show_transaction_sub_budget, Show_transaction_chq, Show_transaction_note, Show_transaction_voucher, Show_transaction_reconcile, Show_transaction_bank, Show_transaction_fin_year, Show_transaction_sort_type, Show_columns_titles, Show_title_column_kind, Show_exclude_split_child, Show_split_amounts, Currency_general, Report_in_payees, Report_can_click, Financial_year_used, Financial_year_kind, Financial_year_select, Date_kind, Date_beginning, Date_end, Split_by_date, Split_date_period, Split_by_fin_year, Split_day_beginning, Account_use_selection, Account_selected, Account_group_transactions, Account_show_amount, Account_show_name, Transfer_kind, Transfer_selected_accounts, Transfer_exclude_transactions, Categ_use, Categ_use_selection, Categ_selected, Categ_show_amount, Categ_show_sub_categ, Categ_show_without_sub_categ, Categ_show_sub_categ_amount, Categ_currency, Categ_show_name, Budget_use, Budget_use_selection, Budget_selected, Budget_show_amount, Budget_show_sub_budget, Budget_show_without_sub_budget, Budget_show_sub_budget_amount, Budget_currency, Budget_show_name, Payee_use, Payee_use_selection, Payee_selected, Payee_show_amount, Payee_currency, Payee_show_name, Amount_currency, Amount_exclude_null, Payment_method_list, Use_text, Use_amount)
A saved report defined in the Grisbi file.
- Nb
Unique identifier.
- Name
Report display name.
- Compl_name_function
Complementary name function.
- Compl_name_position
Complementary name position.
- Compl_name_used
Use complementary name.
- General_sort_type
General sort specification string.
- Show_r
Show reconciled transactions.
- Show_transaction
Show individual transactions.
- Show_transaction_amount
Show transaction amount column.
- Show_transaction_nb
Show transaction number column.
- Show_transaction_date
Show transaction date column.
- Show_transaction_payee
Show payee column.
- Show_transaction_categ
Show category column.
- Show_transaction_sub_categ
Show sub-category column.
- Show_transaction_payment
Show payment method column.
- Show_transaction_budget
Show budget column.
- Show_transaction_sub_budget
Show sub-budget column.
- Show_transaction_chq
Show cheque/reference column.
- Show_transaction_note
Show notes column.
- Show_transaction_voucher
Show voucher column.
- Show_transaction_reconcile
Show reconcile column.
- Show_transaction_bank
Show bank reference column.
- Show_transaction_fin_year
Show financial year column.
- Show_transaction_sort_type
Show sort type column.
- Show_columns_titles
Show column titles.
- Show_title_column_kind
Show title column kind.
- Show_exclude_split_child
Exclude breakdown child rows.
- Show_split_amounts
Show split amounts.
- Currency_general
Currency identifier for the report.
- Report_in_payees
Include payees in the report.
- Report_can_click
Report rows are clickable.
- Financial_year_used
Filter by financial year.
- Financial_year_kind
Financial year filter kind.
- Financial_year_select
Selected financial years (nullable).
- Date_kind
Date range kind.
- Date_beginning
Report start date string.
- Date_end
Report end date string.
- Split_by_date
Split report by date.
- Split_date_period
Date split period.
- Split_by_fin_year
Split report by financial year.
- Split_day_beginning
Day the report period begins.
- Account_use_selection
Filter by account selection.
- Account_selected
Selected accounts (nullable).
- Account_group_transactions
Group transactions by account.
- Account_show_amount
Show account amount.
- Account_show_name
Show account name.
- Transfer_kind
Transfer inclusion kind.
- Transfer_selected_accounts
Selected transfer accounts (nullable).
- Transfer_exclude_transactions
Exclude transfer transactions.
- Categ_use
Use category filtering.
- Categ_use_selection
Filter by category selection.
- Categ_selected
Selected categories (nullable).
- Categ_show_amount
Show category amount.
- Categ_show_sub_categ
Show sub-categories.
- Categ_show_without_sub_categ
Show categories without sub-categories.
- Categ_show_sub_categ_amount
Show sub-category amounts.
- Categ_currency
Currency identifier for category display.
- Categ_show_name
Show category names.
- Budget_use
Use budget filtering.
- Budget_use_selection
Filter by budget selection.
- Budget_selected
Selected budget lines (nullable).
- Budget_show_amount
Show budget amount.
- Budget_show_sub_budget
Show sub-budget lines.
- Budget_show_without_sub_budget
Show budgets without sub-budgets.
- Budget_show_sub_budget_amount
Show sub-budget amounts.
- Budget_currency
Currency identifier for budget display.
- Budget_show_name
Show budget names.
- Payee_use
Use payee filtering.
- Payee_use_selection
Filter by payee selection.
- Payee_selected
Selected payees (nullable).
- Payee_show_amount
Show payee amount.
- Payee_currency
Currency identifier for payee display.
- Payee_show_name
Show payee names.
- Amount_currency
Currency identifier for amount display.
- Amount_exclude_null
Exclude zero-amount rows.
- Payment_method_list
Payment methods filter (nullable).
- Use_text
Use text comparison filter.
- Use_amount
Use amount comparison filter.
- Parameters:
Nb (
int)Name (
str)Compl_name_function (
int)Compl_name_position (
int)Compl_name_used (
bool)General_sort_type (
str)Show_r (
bool)Show_transaction (
bool)Show_transaction_amount (
bool)Show_transaction_nb (
bool)Show_transaction_date (
bool)Show_transaction_payee (
bool)Show_transaction_categ (
bool)Show_transaction_sub_categ (
bool)Show_transaction_payment (
bool)Show_transaction_budget (
bool)Show_transaction_sub_budget (
bool)Show_transaction_chq (
bool)Show_transaction_note (
bool)Show_transaction_voucher (
bool)Show_transaction_reconcile (
bool)Show_transaction_bank (
bool)Show_transaction_fin_year (
bool)Show_transaction_sort_type (
bool)Show_columns_titles (
bool)Show_title_column_kind (
bool)Show_exclude_split_child (
bool)Show_split_amounts (
bool)Currency_general (
int)Report_in_payees (
bool)Report_can_click (
bool)Financial_year_used (
bool)Financial_year_kind (
int)Financial_year_select (
str|None)Date_kind (
int)Date_beginning (
str)Date_end (
str)Split_by_date (
bool)Split_date_period (
int)Split_by_fin_year (
bool)Split_day_beginning (
int)Account_use_selection (
bool)Account_selected (
str|None)Account_group_transactions (
bool)Account_show_amount (
bool)Account_show_name (
bool)Transfer_kind (
int)Transfer_selected_accounts (
str|None)Transfer_exclude_transactions (
bool)Categ_use (
bool)Categ_use_selection (
bool)Categ_selected (
str|None)Categ_show_amount (
bool)Categ_show_sub_categ (
bool)Categ_show_without_sub_categ (
bool)Categ_show_sub_categ_amount (
bool)Categ_currency (
int)Categ_show_name (
bool)Budget_use (
bool)Budget_use_selection (
bool)Budget_selected (
str|None)Budget_show_amount (
bool)Budget_show_sub_budget (
bool)Budget_show_without_sub_budget (
bool)Budget_show_sub_budget_amount (
bool)Budget_currency (
int)Budget_show_name (
bool)Payee_use (
bool)Payee_use_selection (
bool)Payee_selected (
str|None)Payee_show_amount (
bool)Payee_currency (
int)Payee_show_name (
bool)Amount_currency (
int)Amount_exclude_null (
bool)Payment_method_list (
str|None)Use_text (
bool)Use_amount (
bool)
- Nb: int
- Name: str
- Compl_name_function: int
- Compl_name_position: int
- Compl_name_used: bool
- General_sort_type: str
- Show_r: bool
- Show_transaction: bool
- Show_transaction_amount: bool
- Show_transaction_nb: bool
- Show_transaction_date: bool
- Show_transaction_payee: bool
- Show_transaction_categ: bool
- Show_transaction_sub_categ: bool
- Show_transaction_payment: bool
- Show_transaction_budget: bool
- Show_transaction_sub_budget: bool
- Show_transaction_chq: bool
- Show_transaction_note: bool
- Show_transaction_voucher: bool
- Show_transaction_reconcile: bool
- Show_transaction_bank: bool
- Show_transaction_fin_year: bool
- Show_transaction_sort_type: bool
- Show_columns_titles: bool
- Show_title_column_kind: bool
- Show_exclude_split_child: bool
- Show_split_amounts: bool
- Currency_general: int
- Report_in_payees: bool
- Report_can_click: bool
- Financial_year_used: bool
- Financial_year_kind: int
- Financial_year_select: str | None
- Date_kind: int
- Date_beginning: str
- Date_end: str
- Split_by_date: bool
- Split_date_period: int
- Split_by_fin_year: bool
- Split_day_beginning: int
- Account_use_selection: bool
- Account_selected: str | None
- Account_group_transactions: bool
- Account_show_amount: bool
- Account_show_name: bool
- Transfer_kind: int
- Transfer_selected_accounts: str | None
- Transfer_exclude_transactions: bool
- Categ_use: bool
- Categ_use_selection: bool
- Categ_selected: str | None
- Categ_show_amount: bool
- Categ_show_sub_categ: bool
- Categ_show_without_sub_categ: bool
- Categ_show_sub_categ_amount: bool
- Categ_currency: int
- Categ_show_name: bool
- Budget_use: bool
- Budget_use_selection: bool
- Budget_selected: str | None
- Budget_show_amount: bool
- Budget_show_sub_budget: bool
- Budget_show_without_sub_budget: bool
- Budget_show_sub_budget_amount: bool
- Budget_currency: int
- Budget_show_name: bool
- Payee_use: bool
- Payee_use_selection: bool
- Payee_selected: str | None
- Payee_show_amount: bool
- Payee_currency: int
- Payee_show_name: bool
- Amount_currency: int
- Amount_exclude_null: bool
- Payment_method_list: str | None
- Use_text: bool
- Use_amount: bool
- class gsbparse.Print(Draw_lines, Draw_column, Draw_background, Draw_archives, Draw_columns_name, Draw_title, Draw_interval_dates, Draw_dates_are_value_dates, Font_transactions, Font_title, Report_font_transactions, Report_font_title)
Print/report rendering preferences stored in the Grisbi file.
- Draw_lines
Draw horizontal separator lines between rows.
- Draw_column
Draw vertical separator lines between columns.
- Draw_background
Draw alternating row backgrounds.
- Draw_archives
Include archived transactions in printouts.
- Draw_columns_name
Print column header names.
- Draw_title
Print a report title.
- Draw_interval_dates
Print the date interval covered.
- Draw_dates_are_value_dates
Use value dates instead of transaction dates.
- Font_transactions
Font descriptor for transaction rows.
- Font_title
Font descriptor for the report title.
- Report_font_transactions
Font descriptor for report transaction rows.
- Report_font_title
Font descriptor for report titles.
- Parameters:
Draw_lines (
bool)Draw_column (
bool)Draw_background (
bool)Draw_archives (
bool)Draw_columns_name (
bool)Draw_title (
bool)Draw_interval_dates (
bool)Draw_dates_are_value_dates (
bool)Font_transactions (
str)Font_title (
str)Report_font_transactions (
str)Report_font_title (
str)
- Draw_lines: bool
- Draw_column: bool
- Draw_background: bool
- Draw_archives: bool
- Draw_columns_name: bool
- Draw_title: bool
- Draw_interval_dates: bool
- Draw_dates_are_value_dates: bool
- Font_transactions: str
- Font_title: str
- Report_font_transactions: str
- Report_font_title: str
- class gsbparse.Rgba(Background_color_0, Background_color_1, Couleur_jour, Background_scheduled, Background_archive, Selection, Background_split, Text_color_0, Text_color_1, Couleur_bet_division, Couleur_bet_future, Couleur_bet_solde, Couleur_bet_transfert)
Colour preferences stored in the Grisbi file.
All values are CSS-style RGB strings, e.g.
"rgb(215,215,255)".- Background_color_0
Alternating row background colour (even).
- Background_color_1
Alternating row background colour (odd).
- Couleur_jour
Current-day highlight colour.
- Background_scheduled
Scheduled-transaction row background.
- Background_archive
Archived-transaction row background.
- Selection
Selected-row colour.
- Background_split
Split-transaction child row background.
- Text_color_0
Primary text colour.
- Text_color_1
Secondary text colour (e.g. negative amounts).
- Couleur_bet_division
Budget-estimate division colour.
- Couleur_bet_future
Budget-estimate future-data colour.
- Couleur_bet_solde
Budget-estimate balance colour.
- Couleur_bet_transfert
Budget-estimate transfer colour.
- Parameters:
Background_color_0 (
str)Background_color_1 (
str)Couleur_jour (
str)Background_scheduled (
str)Background_archive (
str)Selection (
str)Background_split (
str)Text_color_0 (
str)Text_color_1 (
str)Couleur_bet_division (
str)Couleur_bet_future (
str)Couleur_bet_solde (
str)Couleur_bet_transfert (
str)
- Background_color_0: str
- Background_color_1: str
- Couleur_jour: str
- Background_scheduled: str
- Background_archive: str
- Selection: str
- Background_split: str
- Text_color_0: str
- Text_color_1: str
- Couleur_bet_division: str
- Couleur_bet_future: str
- Couleur_bet_solde: str
- Couleur_bet_transfert: str
- class gsbparse.Bet(Ddte, Bet_deb_cash_account_option)
Global budget-estimate options.
Note: The format spec lists
Bdtebut the example file usesDdte. This implementation uses the attribute name from the example file.- Ddte
Default start-date mode (1 = first day of month, 2 = today).
- Bet_deb_cash_account_option
Debit/cash account option flag.
- Parameters:
Ddte (
int)Bet_deb_cash_account_option (
int)
- Ddte: int
- Bet_deb_cash_account_option: int
- class gsbparse.BetGraph(prefs)
Graph display preferences for the budget-estimate module.
Multiple
<Bet_graph>elements may appear in a file — one for the forecast graph and one for the historical graph. Theprefsstring is a colon-delimited list of settings (e.g."forecast_prefs:0:1:0:1:2:0:0:90:50:1:0:0").- prefs
Raw colon-delimited preferences string.
- Parameters:
prefs (
str)
- prefs: str
- class gsbparse.BetHistorical(Nb, Ac, Ori, Div, Edit, Damount, SDiv, SEdit, SDamount)
Historical budget data used by the budget-estimate module.
One element per checked category/budget division.
- Nb
Unique identifier.
- Ac
Account identifier.
- Ori
Data origin (categories or budget lines).
- Div
Division number (category or budget line identifier).
- Edit
Whether the amount has been manually overridden.
- Damount
Overridden amount for the division.
- SDiv
Sub-division number.
- SEdit
Whether the sub-division amount has been manually overridden.
- SDamount
Overridden amount for the sub-division.
- Parameters:
Nb (
int)Ac (
int)Ori (
BetDataOrigin)Div (
int)Edit (
bool)Damount (
Decimal)SDiv (
int)SEdit (
bool)SDamount (
Decimal)
- Nb: int
- Ac: int
- Ori: BetDataOrigin
- Div: int
- Edit: bool
- Damount: Decimal
- SDiv: int
- SEdit: bool
- SDamount: Decimal
- class gsbparse.BetFuture(Nb, Dt, Ac, Am, Pa, IsT, Tra, Ca, Sca, Pn, Fi, Bu, Sbu, No, Au, Pe, Pei, Pep, Dtl, Mo)
A future/projected transaction in the budget-estimate module.
Fields mirror those of
Scheduled.- Nb
Unique identifier.
- Dt
Date (nullable).
- Ac
Account identifier.
- Am
Amount.
- Pa
Party identifier.
- IsT
Is a transfer (1 = transfer, with the target account in
Tra).
- Tra
Transfer target account identifier.
- Ca
Category identifier.
- Sca
Sub-category identifier.
- Pn
Payment method identifier.
- Fi
Financial year identifier.
- Bu
Budget line identifier.
- Sbu
Sub-budget line identifier.
- No
Notes (nullable).
- Au
Automatic transaction flag.
- Pe
Periodicity.
- Pei
Periodicity interval.
- Pep
Custom periodicity.
- Dtl
Limit date (nullable).
- Mo
Mother transaction identifier (for breakdown children).
- Parameters:
Nb (
int)Dt (
date|None)Ac (
int)Am (
Decimal)Pa (
int)IsT (
bool)Tra (
int)Ca (
int)Sca (
int)Pn (
int)Fi (
int)Bu (
int)Sbu (
int)No (
str|None)Au (
bool)Pe (
int)Pei (
int)Pep (
int)Dtl (
date|None)Mo (
int)
- Nb: int
- Dt: date | None
- Ac: int
- Am: Decimal
- Pa: int
- IsT: bool
- Tra: int
- Ca: int
- Sca: int
- Pn: int
- Fi: int
- Bu: int
- Sbu: int
- No: str | None
- Au: bool
- Pe: int
- Pei: int
- Pep: int
- Dtl: date | None
- Mo: int
- class gsbparse.BetLoan(Nb, Ac, Ver, InCol, Ca, Duree, FDate, Fees, Taux, TyTaux, NbreDec, FEchDif, FCa, FIn, OEch, ISchWL, AAc, ASch, AFr, CaDu)
A loan amortisation schedule defined in the Grisbi file.
- Nb
Loan number (starts at 0).
- Ac
Account identifier.
- Ver
Version number (incremented on each renegotiation).
- InCol
Invert the capital/payment columns in amortisation tables.
- Ca
Principal (capital).
- Duree
Duration (number of payments).
- FDate
First payment date (nullable).
- Fees
Fees per payment.
- Taux
Annual interest rate.
- TyTaux
Interest rate type.
- NbreDec
Number of decimal places (3-9).
- FEchDif
First payment differs from subsequent payments.
- FCa
Capital portion of the first payment.
- FIn
Interest portion of the first payment.
- OEch
Amount of subsequent payments (when first differs).
- ISchWL
Initialise the associated scheduled transaction from the table.
- AAc
Associated account for the scheduled transaction.
- ASch
Scheduled transaction number for the associated account.
- AFr
Scheduled transaction frequency in months.
- CaDu
Remaining capital.
- Parameters:
Nb (
int)Ac (
int)Ver (
int)InCol (
bool)Ca (
Decimal)Duree (
int)FDate (
date|None)Fees (
Decimal)Taux (
Decimal)TyTaux (
int)NbreDec (
int)FEchDif (
bool)FCa (
Decimal)FIn (
Decimal)OEch (
Decimal)ISchWL (
bool)AAc (
int)ASch (
int)AFr (
int)CaDu (
Decimal)
- Nb: int
- Ac: int
- Ver: int
- InCol: bool
- Ca: Decimal
- Duree: int
- FDate: date | None
- Fees: Decimal
- Taux: Decimal
- TyTaux: int
- NbreDec: int
- FEchDif: bool
- FCa: Decimal
- FIn: Decimal
- OEch: Decimal
- ISchWL: bool
- AAc: int
- ASch: int
- AFr: int
- CaDu: Decimal
- class gsbparse.BetTransfert(Nb, Dt, Ac, Ty, Ra, Rt, Dd, Dtb, Mlbd, Pa, Pn, Ca, Sca, Bu, Sbu, CPa, CCa, CSca, CBu, CSbu)
A deferred-debit or partial-balance settlement entry.
Used when a credit-card account (deferred debit) or a partial balance is settled against a main bank account.
- Nb
Unique identifier.
- Dt
Settlement date on the main bank account (nullable).
- Ac
Account identifier (the deferred-debit or partial-balance account).
- Ty
Account type being settled (cash account or partial balance).
- Ra
Account or partial-balance number concerned.
- Rt
Replace a transaction whose date falls in the import search window.
- Dd
Create the debit transaction in the target account.
- Dtb
Month switchover date (day after the statement cutoff) (nullable).
- Mlbd
Force settlement date to the last banking day of the month.
- Pa
Party identifier.
- Pn
Payment method identifier.
- Ca
Category identifier.
- Sca
Sub-category identifier.
- Bu
Budget line identifier.
- Sbu
Sub-budget line identifier.
- CPa
Counter-party identifier.
- CCa
Counter-category identifier.
- CSca
Counter-sub-category identifier.
- CBu
Counter-budget identifier.
- CSbu
Counter-sub-budget identifier.
- Parameters:
Nb (
int)Dt (
date|None)Ac (
int)Ty (
BetTransfertAccountType)Ra (
int)Rt (
bool)Dd (
bool)Dtb (
date|None)Mlbd (
bool)Pa (
int)Pn (
int)Ca (
int)Sca (
int)Bu (
int)Sbu (
int)CPa (
int)CCa (
int)CSca (
int)CBu (
int)CSbu (
int)
- Nb: int
- Dt: date | None
- Ac: int
- Ty: BetTransfertAccountType
- Ra: int
- Rt: bool
- Dd: bool
- Dtb: date | None
- Mlbd: bool
- Pa: int
- Pn: int
- Ca: int
- Sca: int
- Bu: int
- Sbu: int
- CPa: int
- CCa: int
- CSca: int
- CBu: int
- CSbu: int
- class gsbparse.SpecialLine(Nb, NuR, SpA, SpAD, SpUD, SpUT)
A special-condition line attached to a CSV import rule.
- Nb
Index of this line within its rule (1-based).
- NuR
Parent import rule number.
- SpA
Action type.
- SpAD
Column containing the data for the inversion action (0-based).
- SpUD
Column containing the data to search (0-based).
- SpUT
Data string to search for.
- Parameters:
Nb (
int)NuR (
int)SpA (
SpecialLineAction)SpAD (
int)SpUD (
int)SpUT (
str)
- Nb: int
- NuR: int
- SpA: SpecialLineAction
- SpAD: int
- SpUD: int
- SpUT: str
- class gsbparse.AmountComparison(Comparison_number, Report_nb, Last_comparison, Comparison_1, Link_1_2, Comparison_2, Amount_1, Amount_2)
An amount-comparison filter rule attached to a report.
- Comparison_number
Index within the report (1-based).
- Report_nb
Parent report identifier.
- Last_comparison
Last comparison index (-1 = none).
- Comparison_1
First comparison operand.
- Link_1_2
Logical link between comparison operands.
- Comparison_2
Second comparison operand.
- Amount_1
First amount operand.
- Amount_2
Second amount operand.
- Parameters:
Comparison_number (
int)Report_nb (
int)Last_comparison (
int)Comparison_1 (
int)Link_1_2 (
int)Comparison_2 (
int)Amount_1 (
Decimal)Amount_2 (
Decimal)
- Comparison_number: int
- Report_nb: int
- Last_comparison: int
- Comparison_1: int
- Link_1_2: int
- Comparison_2: int
- Amount_1: Decimal
- Amount_2: Decimal
- class gsbparse.TextComparison(Comparison_number, Report_nb, Last_comparison, Object, Operator, Text, Use_text, Comparison_1, Link_1_2, Comparison_2, Amount_1, Amount_2)
A text-comparison filter rule attached to a report.
- Comparison_number
Index within the report (1-based).
- Report_nb
Parent report identifier.
- Last_comparison
Last comparison index (-1 = none).
- Object
Object type to compare.
- Operator
Comparison operator.
- Text
Text to match.
- Use_text
Apply this text comparison.
- Comparison_1
First comparison operand.
- Link_1_2
Logical link between comparison operands.
- Comparison_2
Second comparison operand.
- Amount_1
First amount operand.
- Amount_2
Second amount operand.
- Parameters:
Comparison_number (
int)Report_nb (
int)Last_comparison (
int)Object (
int)Operator (
int)Text (
str)Use_text (
bool)Comparison_1 (
int)Link_1_2 (
int)Comparison_2 (
int)Amount_1 (
Decimal)Amount_2 (
Decimal)
- Comparison_number: int
- Report_nb: int
- Last_comparison: int
- Object: int
- Operator: int
- Text: str
- Use_text: bool
- Comparison_1: int
- Link_1_2: int
- Comparison_2: int
- Amount_1: Decimal
- Amount_2: Decimal
Pandas adapter
- gsbparse.adapters.pandas.to_df(items, columns=None)
- Overloads:
items (list[GsbFileSection]), columns (None) → pd.DataFrame
items (list[DetailedTransaction]), columns (list[DetailedTransactionColumn] | None) → pd.DataFrame
- Parameters:
items (list[GsbFileSection] | list[DetailedTransaction])
columns (list[DetailedTransactionColumn] | None)
- Return type:
DataFrame
Convert a list of domain objects to a
pd.DataFrame.Dispatches on the element type of items:
list[GsbFileSection]— each dataclass field becomes a column; column names are Grisbi attribute codes (Nb,Na, …).list[DetailedTransaction]— projected via columns specs; defaults toDEFAULT_DETAILED_TRANSACTION_COLUMNS.
- Parameters:
items (
list[GsbFileSection] |list[DetailedTransaction]) – A non-empty list ofGsbFileSectionorDetailedTransactioninstances.columns (
list[DetailedTransactionColumn] |None) – Column projection specs, only applicable forDetailedTransactioninput. Ignored (and must beNone) for section lists.
- Returns:
A
pd.DataFrame.- Raises:
MixedSectionsError – A section list contains more than one concrete type.
UnknownDetailedTransactionPathError – A column spec references a non-existent attribute path.
ValueError – items is empty.
- Return type:
DataFrame
Errors
- exception gsbparse.GsbParseError
Base class for every exception raised by gsbparse.
- exception gsbparse.InvalidGsbFileError
The file could not be parsed as XML or the structure is invalid.
- exception gsbparse.InvalidGsbFileRootError
The XML root element is not
<Grisbi>.
- exception gsbparse.SectionNotFoundError
A mandatory section is missing from the file.
- exception gsbparse.InvalidElementCountError
A section’s cardinality is violated (e.g. multiple
<General>elements).
- exception gsbparse.XmlParsingError
An attribute value could not be parsed as its expected type.
- exception gsbparse.UnknownDetailedTransactionPathError
A
DetailedTransactionColumn.pathreferences a non-existent attribute.
- exception gsbparse.MixedSectionsError(found_types)
to_dfwas called with a list containing more than one concrete section type.Multiple-inherits from
TypeErrorso generic handlers that catchTypeErrorstill catch it. Thefound_typesattribute exposes the concrete types discovered in the list for programmatic introspection.- Parameters:
found_types (
list[type])- Return type:
None