tariochbctools.importers.quickfile package

Submodules

tariochbctools.importers.quickfile.importer module

class tariochbctools.importers.quickfile.importer.Importer[source]

Bases: Importer

An importer for QuickFile

account(filepath)[source]

Return the account associated with the given file.

The account is used to determine the archival folder for the document. While the interface allows returning different accounts for different documents, normally the returned account is a just a function of the importer instance.

Parameters:

filepath – Filesystem path to the document being imported.

Returns:

An account name.

extract(filepath, existing=None)[source]

Extract transactions and other directives from a document.

The existing entries list is loaded from the existing ledger file, if the user specified one on the command line. It can be used to supplement the information provided by the document being processed to drive the extraction. For example to derive the prior state of the inventory.

Parameters:
  • filepath – Filesystem path to the document being imported.

  • existing – Entries loaded from the existing ledger.

Returns:

A list of imported directives extracted from the document.

identify(filepath)[source]

Return True if this importer matches the given file.

Parameters:

filepath – Filesystem path to the document to be matched.

Returns:

True if this importer can handle this file.

class tariochbctools.importers.quickfile.importer.QuickFile(account_number, api_key, app_id)[source]

Bases: object

Encapsulate QuickFile API protocol and data types

API_VERSION_SLUG = '1_2'
DOMAIN = 'quickfile.co.uk'
static auth_md5(account_number, api_key, submission_number)[source]
request_header()[source]
class tariochbctools.importers.quickfile.importer.QuickFileBankSearch(MetaData, Transactions)[source]

Bases: NamedTuple

MetaData: QuickFileResponseMetaData

Alias for field number 0

Transactions: Dict[str, List[QuickFileTransaction]]

Alias for field number 1

class tariochbctools.importers.quickfile.importer.QuickFileResponseMetaData(RecordsetCount, ReturnCount, BankName, BankType, AccountNo, SortCode, Currency, CurrentBalance)[source]

Bases: NamedTuple

AccountNo: str

Alias for field number 4

BankName: str

Alias for field number 2

BankType: str

Alias for field number 3

Currency: str

Alias for field number 6

CurrentBalance: str

Alias for field number 7

RecordsetCount: int

Alias for field number 0

ReturnCount: int

Alias for field number 1

SortCode: str

Alias for field number 5

class tariochbctools.importers.quickfile.importer.QuickFileTransaction(TransactionDate: str, Reference: str, Amount: str, TagStatus: str, TransactionId: str)[source]

Bases: NamedTuple

Transaction data from QuickFile transaction API

Amount: str

Alias for field number 2

Reference: str

Alias for field number 1

TagStatus: str

Alias for field number 3

TransactionDate: str

Alias for field number 0

TransactionId: str

Alias for field number 4

to_beancount_transaction(local_account, currency, invert_sign=False)[source]

Module contents