{ "info": { "author": "Partizand", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Office/Business :: Financial :: Accounting", "Topic :: Utilities" ], "description": "GnuCash reports\n===============\n\nPython library for get reports from `GnuCash `_ to xlsx files.\n\nIt connects directly to the GnuCash book (xml or sql) and `Pandas `_ use to building reports.\nNo cycles for calculation, less errors, less code.\n\nThe library is cross-platform, Excel is not required, you can use LibreOffice/OpenOffice\n\nGnuCash python bindings not use, because it platform depended and unstable.\nAll data from GnuCash loads into DataFrames as is, table to table. Then data are processed only thru Pandas.\n\nInstall\n-------\n\n#. Install `Python `_ version 3 (version 2 should work, but I have not tested)\n\n#. Install gnucashreport::\n\n pip install gnucashreport\n\nNow, you may use cli tool gcreport\n\n.. [#] Pandas need install before, because numpy have `installation thru install_requires directive issue `_\n\nSimple command line tool\n------------------------\n\nLibrary contain the simple cli tool, usage::\n\n gcreport gnucash_file xlsx_file [--glevel glevel] [--open_if_lock]\n\ngnucash_file\n Your gnucash database file\n\nxlsx_file\n Path to xlsx file for saving reports\n\n--glevel glevel Level to group accounts, may be multiple (--glevel 0 --glevel 1)\n\n--open_if_lock Open sqlite base even if opened other user\n\nIt's save all reports to excel file. (As all_reports_excel function)\n\nExamples\n--------\n\n>>> import gnucashreport\n>>> gcrep = GCReport()\n\nopen gnucash book (sql or xml)\n\n>>> gcrep.open_book_file('v:/gnucash-base/sqlite/GnuCash-base.gnucash', open_if_lock=True)\n\nsave all splits to Excel (with account name, decription, currency mnemonic and other)\n\n>>> from gnucashreport.utils import dataframe_to_excel\n>>> dataframe_to_excel(gcrep.df_splits, 'v:/tables/splits.xlsx')\n\nSave complex reports in xlsx file:\n\nThis report contain:\n\n- Income, expense, profit, assets, loans, equity by months each year (sheet on each year)\n- Income, expense, profit, assets, loans, equity by years on each full year\n- Personal inflation (annual expenditure growth)\n- Return on assets\n- Some charts\n\n>>> gcrep.all_reports_excel('v:/tables/ex-test.xlsx', glevel=1)\n\nReturn on assets\n----------------\n\nThis option is experimental. A few tests written. But it looks like the truth :)\n\nThe library may consider the profitability of accounts taking into account the hierarchy.\nAny asset accounts: deposit, liability, bank, not only stock. You can calculate the yield for all time or a specified period.\nYou can calculate the portfolio return of the stock or all of the assets.\n\nYou should mark the account of incomes and expenses for calculation of yield.\nSet **%invest%** in notes of account. Then the account and its descendants will be taken into when calculating profitability.\nIf you mark the account **%no_invest%** in notes, it and its descendants will not be considered in calculating the yield\n\n.. code-block:: python\n\n # open gnucash book\n import gnucashreport\n gcrep = GCReport()\n gcrep.open_book_file(your_gnucash_file)\n\n # Get return on assets\n gcrep.returns_report_excel('returns.xlsx')\n\n\nSee the sheet 'return' in .xlsx file after launch command line tool\n\nAll results are displayed in percent per annum:\n\nTotal\n The total return on asset taking into account the costs\n\nMoney flow\n Profitability money flow from account. Dividends, interests on other account, etc\n\nExpense\n The costs of servicing the account (per annum)\n\nCapital\n Capital gains\n\n\nExplain glevel\n--------------\n\nglevel - how group accounts by levels: array of levels or single int level\n\nExamples:\n\nAccounts structure:\n\n======= =============== ========\n account levels\n--------------------------------\n0 1 2\n======= =============== ========\nAssets: Current assets: Cash\nAssets: Current assets: Card\nAssets: Reserve: Deposite\nAssets: Reserve: Cash\n======= =============== ========\n\nExample 1::\n\n glevel=[0, 1]\n\nGroup accounts for 0 and 1 level, into 2 rows and 2 columns (Multiindex dataframe):\n\n+------------+----------------+\n| 0 | 1 |\n+============+================+\n| Assets | Current assets |\n+ +----------------+\n| | Reserve |\n+------------+----------------+\n\nExample 2::\n\n glevel=1\n\nGroups only 1 level, into 2 rows and 1 column:\n\n+----------------+\n| 1 |\n+================+\n| Current assets |\n+----------------+\n| Reserve |\n+----------------+\n\nTesting\n-------\n\nAll my testing data is real. Then all testing function use external folder.\nFor create test data, save sql book file and xml book file into any folder. Use the same data for sql and xml.\nCreate empty folder for test data.\nSet this options in src/test/basetest.py\n\n.. code-block:: python\n\n bookfile_sql = your_sql_base\n bookfile_xml = your_xml_base\n dir_testdata = folder_for_test_data\n\n\nRun the script src/test/savetestdata.py. Run only on working commit version!\n\nNow you may run tests.\n\n setup.py test\n\nProfitability test use special GnuCash book file in test/data/xirr-test.gnucash\n\nlicense\n-------\n\n`GNU GPL 3 `_\n\nauthor\n------\n\nPartizand\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/partizand/gnucashreport", "keywords": "GnuCash,finance,reports", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "gnucashreport", "package_url": "https://pypi.org/project/gnucashreport/", "platform": "", "project_url": "https://pypi.org/project/gnucashreport/", "project_urls": { "Homepage": "https://github.com/partizand/gnucashreport" }, "release_url": "https://pypi.org/project/gnucashreport/0.2.4/", "requires_dist": [ "numpy", "pandas (>=0.23.0)", "xlsxwriter (>=1.0.5)", "python-dateutil (>=2.7.3)", "SQLAlchemy" ], "requires_python": "", "summary": "Reports from GnuCash to xlsx files", "version": "0.2.4" }, "last_serial": 5042331, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6506e6d1374f583424c2beed177e7581", "sha256": "d4e706fdb436eb76664ed439381011a2f2595bab229c48be37d21279b2de9306" }, "downloads": -1, "filename": "gnucashreport-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6506e6d1374f583424c2beed177e7581", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 31417, "upload_time": "2017-02-22T12:32:20", "url": "https://files.pythonhosted.org/packages/e0/ed/4b386a7357f6e1a1297aa6e8acf969bfef96b7005d260f29f7ad04b1828f/gnucashreport-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "954436c15acbf713470d626610e9292c", "sha256": "bbd1f41dc4d0d7ac137f2677d26ccb7b3d2c32eb1fd5cedccdd7296db8d85ebc" }, "downloads": -1, "filename": "gnucashreport-0.1.0-py3.5.egg", "has_sig": false, "md5_digest": "954436c15acbf713470d626610e9292c", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 57981, "upload_time": "2017-02-22T12:32:22", "url": "https://files.pythonhosted.org/packages/e4/c5/42d3d9d700ccbacf3fef652a268fcacf131d6637b0fb50abf9cfab95f770/gnucashreport-0.1.0-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "1429af75a8ef22328f4c790f783096b0", "sha256": "f510cb3eb09117d8a5cbb973b7a7099f116fef4d525cdb3a1babc91ad6b3f572" }, "downloads": -1, "filename": "gnucashreport-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1429af75a8ef22328f4c790f783096b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26774, "upload_time": "2017-02-22T12:32:25", "url": "https://files.pythonhosted.org/packages/98/da/1b86bb389462777dc1595fe025fedf903ddb106c3855ab4ce4b3a08a2379/gnucashreport-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "eb823c0844bc28519869f8b3ba5345ae", "sha256": "f0eec32427704da5e6179b4243985e12c5006057299428d9db692bae809d7403" }, "downloads": -1, "filename": "gnucashreport-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb823c0844bc28519869f8b3ba5345ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 53773, "upload_time": "2017-05-04T14:21:58", "url": "https://files.pythonhosted.org/packages/0e/2c/e028bbb4817703b599b6a05dafe530ede4dc469ed14eba6d162b7c428bdf/gnucashreport-0.2.0-py2.py3-none-any.whl" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a10414f3bf6659bfbcc6ef808c53de9c", "sha256": "7ff6fb85bd492449854788153511ba78aaff02eb1128f7af3cec559450a87012" }, "downloads": -1, "filename": "gnucashreport-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a10414f3bf6659bfbcc6ef808c53de9c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 83008, "upload_time": "2018-06-06T14:18:27", "url": "https://files.pythonhosted.org/packages/6e/25/5b737ca83eb0fe0e5d0a62d851d67bfba871838fb339a77059bb199d08a9/gnucashreport-0.2.2-py2.py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "7ca49b8abe4c60a86e3f732ae5bdfa5b", "sha256": "2dbca62c33831fd0536a3d6b3cb2a3ed9745ac5e1935c1ac53cc4ab1e8fa050a" }, "downloads": -1, "filename": "gnucashreport-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7ca49b8abe4c60a86e3f732ae5bdfa5b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 82427, "upload_time": "2018-06-08T13:40:01", "url": "https://files.pythonhosted.org/packages/aa/4a/80b3f155bd3363010b9385d310cc4a61b36d3cfdbd9f43b92745e38b22b9/gnucashreport-0.2.3-py2.py3-none-any.whl" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "c8cb7c55fafbf30bdbbaef0f2c807076", "sha256": "6e1fb1ccb8bf083aa139aaea85d82a2bf5c2986e328c2194df09e9a9839efa0e" }, "downloads": -1, "filename": "gnucashreport-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c8cb7c55fafbf30bdbbaef0f2c807076", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 91335, "upload_time": "2019-04-02T06:47:59", "url": "https://files.pythonhosted.org/packages/6d/b5/1dee7a1cb1a8f43b15f1a81ae427985d98dcdb64e572019968d5d8fb9cca/gnucashreport-0.2.4-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8cb7c55fafbf30bdbbaef0f2c807076", "sha256": "6e1fb1ccb8bf083aa139aaea85d82a2bf5c2986e328c2194df09e9a9839efa0e" }, "downloads": -1, "filename": "gnucashreport-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c8cb7c55fafbf30bdbbaef0f2c807076", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 91335, "upload_time": "2019-04-02T06:47:59", "url": "https://files.pythonhosted.org/packages/6d/b5/1dee7a1cb1a8f43b15f1a81ae427985d98dcdb64e572019968d5d8fb9cca/gnucashreport-0.2.4-py2.py3-none-any.whl" } ] }