Skip to content

mondjef/smart_importer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smart_importer

A smart importer for beancount and fava, currently in development as a suggestion for #579 Import: Intelligent suggestions for account names

Status

Prototype, work in progress.

image

Installation

pip install smart_importer

# or, to install from local git clone:
pip install --editable .

Usage

When writing a beancount importer, users can apply decorators to their importer classes in order to benefit from smart predictions and suggestions provided by machine learning.

For example:

@PredictPostings(training_data="trainingdata.beancount")
@PredictPayees(training_data="trainingdata.beancount")
class MyImporter(ImporterProtocol):
    def extract(file):
      # do the import, e.g., from a csv file

If you don't want to modify your importers you can also manually instantiate this e.g. in our foo.import

from smart_importer.predict_postings import PredictPostings

MyImporter = PredictPostings(suggest_accounts=False)(MyImporter)
CONFIG = [
   MyImporter("someconfig")
]

Development

# for nicer test output:
pip install coloredlogs

# to run unittests:
make test

About

smart importer for fava and beancount

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Other 0.7%