Examples of programs written with piecash
=========================================

You can find examples of programs/scripts (loosely based on the scripts for the
official python bindings for gnucash or on
questions posted on the mailing list) in the examples subfolder.

Creating and opening gnucash files
----------------------------------
.. literalinclude:: ../../../examples/simple_session.py

Creating an account
-------------------
.. literalinclude:: ../../../examples/simple_sqlite_create.py

Creating a transaction
----------------------
.. literalinclude:: ../../../examples/simple_test.py

Modifying existing transactions/splits
--------------------------------------
.. literalinclude:: ../../../examples/simple_transaction_split_change.py

Delete an account in a book
---------------------------
.. literalinclude:: ../../../examples/simple_delete_account.py

Save/cancel changes in a book
-----------------------------
.. literalinclude:: ../../../examples/simple_book.py

Create a book with some accounts and add a transaction
------------------------------------------------------
.. literalinclude:: ../../../examples/simple_book_transaction_creation.py

Export transactions to a CSV file
---------------------------------
.. literalinclude:: ../../../examples/simple_export_transaction_csv.py

Extract Split information as pandas DataFrame
---------------------------------------------
.. literalinclude:: ../../../examples/simple_extract_splits_to_pandas.py

Filtered transaction reports
----------------------------
.. literalinclude:: ../../../examples/filtered_transaction_report.py
