File Format : XML v MySQL / postgres / sqllite

Sébastien de Menten sdementen at gmail.com
Sun Jan 28 06:31:09 EST 2018


Editing a gnucash book via piecash is not the approved way of doing it
(advice from the gnucash core team that recommends to go through the
gnucash engine) but a very nice way ;-)

However, for reading gnucash books, it is an alternative as they are many
to choose (to read from XML, to read from SQL, ...)

On Jan 28, 2018 12:03, "D" <sunfish62 at yahoo.com> wrote:

> Sébastien,
>
> I know that users are advised not to edit their Gnucash data directly; is
> piecash an approved application to edit Gnucash data directly?
>
> David
>
>
> On January 28, 2018, at 3:41 PM, Sébastien de Menten <sdementen at gmail.com>
> wrote:
>
>
> David,
>
> This is one of the key reason for piecash to exist as it does not need any
> compilation (it is a pure python package) and works even without having
> gnucash installed.
> It doesn't use gnucash libraries as it reads (and writes) directly to the
> gnucash book through SQL.
>
>
> I do not have a Mac so I can't test the installation directly but it
> should be just a matter of installing the "piecash" package available on
> PyPI (the python package index).
>
> Sebastien
>
> On Jan 28, 2018 08:00, "David T." <sunfish62 at yahoo.com> wrote:
>
>> Sebastien,
>>
>> The problem isn’t with Python (I am told that Macs already have Python on
>> them). The problem as I understand it (John will no doubt correct me when
>> my statements prove ill-informed or flat out wrong) has to do with the fact
>> that GnuCash requires a specific version of Python, which can only be
>> guaranteed by compiling GnuCash with the current version of Python. Short
>> of shipping GnuCash with a complete Python installation, the only way
>> around this is for individual users to compile locally. Which, as I noted,
>> is a painful process for me. But thanks for the information.
>>
>> David
>>
>>
>> On Jan 28, 2018, at 11:55 AM, Sébastien de Menten <sdementen at gmail.com>
>> wrote:
>>
>> Hello David,
>>
>> Regarding the use of python on windows and Mac, Anaconda has made a huge
>> difference in the last years providing all packages in an easy precompiled
>> version.
>> You can have a look at https://conda.io/docs/user-
>> guide/install/macos.html for the installation (which is simple and does
>> not require any compiler).
>>
>>
>> On Jan 28, 2018 05:42, "D" <sunfish62 at yahoo.com> wrote:
>>
>>> Ah, yes that was my incorrect reference. Sorry for the crossed reference.
>>>
>>> I will note that my confusion stems in part from the fact that, as a Mac
>>> user, I have never used anything to do with python and Gnucash, on account
>>> of the high barrier to install the proper toolsets (i.e., compiling
>>> yourself). My previous attempts at this process always ended in frustration
>>> and failure. As a consequence, when I see anything that mentions python and
>>> Gnucash, my eyes glaze over.
>>>
>>> In the past, there hasn't been much to recommend beating my head against
>>> that wall, but perhaps the time has come to see what happens at this time,
>>> since there eh to be increasing numbers of ways to use python with Gnucash
>>> data.
>>>
>>> David
>>>
>>> On January 28, 2018, at 12:55 AM, John Ralls <jralls at ceridwen.us> wrote:
>>>
>>> I suspect David was thinking of CuteCash, Christian Stimming’s
>>> experimental Qt GUI.
>>>
>>> Regards,
>>> John Ralls
>>>
>>> > On Jan 27, 2018, at 10:44 AM, Sébastien de Menten <sdementen at gmail.com>
>>> wrote:
>>> >
>>> > Hello David,
>>> >
>>> > I saw you were mentioning piecash in your message. If you talk about
>>> > http://piecash.readthedocs.io/en/latest/, it is not a proof of
>>> concept for
>>> > a frontend but an alternative to the gnucash python bindings to work
>>> with
>>> > gnucash books stored in any of the 3 SQL backends (SQLite, postgres and
>>> > MySQL) and is alive and maintained (last release on the 20th December
>>> 2017).
>>> >
>>> > The following article https://arachnoid.com/gnucash_utilities/ shows
>>> some
>>> > interesting use cases for it.
>>> >
>>> > With gnucash 3.0, piecash will also allow you to write your own reports
>>> > using si python and jinja2 (work in progress).
>>> >
>>> > For people interested to contribute, https://github.com/sdementen/p
>>> iecash.
>>> >
>>> >
>>> > On Jan 27, 2018 18:27, "D via gnucash-user" <gnucash-user at gnucash.org>
>>> > wrote:
>>> >
>>> > Mike,
>>> >
>>> > There is nothing new as far as I know about the file formats. You are
>>> right
>>> > that the primary benefit to using sql is being able to generate data
>>> sets
>>> > from sql that can used in reports. Processing a data file is no
>>> quicker in
>>> > sql, since it all gets loaded in at start up. Sql, moreover, adds a
>>> > database manager role to the mix; many users are not prepared to learn
>>> how
>>> > to manage a database platform to manage their financial accounts.
>>> >
>>> > I stick with the XML because it also can store the data compressed;
>>> when
>>> > dealing with the main data file and all its copies, the difference
>>> between
>>> > 3mb and 13mb adds up quickly.
>>> >
>>> > Piecash, as I understand it, was a proof-of-concept experiment to see
>>> > whether a python front end could be designed. It has not been
>>> maintained
>>> > for some years now, and I recall recent discussion about changing its
>>> > status with the project.
>>> >
>>> > As far as I know, there has been no change in recommendation to stay
>>> with
>>> > xml.
>>> >
>>> > David
>>> >
>>> > On January 27, 2018, at 12:13 PM, Adrien Monteleone <
>>> > adrien.monteleone at gmail.com> wrote:
>>> >
>>> > I switched from XML to SQLite about a year ago. I perceive a
>>> performance
>>> > improvement on loading, but that’s about it. (and I generally never
>>> shut
>>> > the app down anyway)
>>> >
>>> > I haven’t attempted any custom reporting yet, but I plan to.
>>> >
>>> > I could be mistaken, but I think PyCash is designed to parse the XML
>>> file
>>> > so you can still get the reporting you want.
>>> >
>>> > Regards,
>>> > Adrien
>>> >
>>> >> On Jan 27, 2018, at 12:55 AM, Mike Stillingfleet <
>>> > mikestillingfleet at fastmail.co.uk> wrote:
>>> >>
>>> >> Dear All,
>>> >>
>>> >> XML is the default when creating a new file.
>>> >>
>>> >> I have seen various quite dated questions about the decision process
>>> of
>>> > selecting which db to use.
>>> >>
>>> >> I think that the main advantage of using MySQL would be the ability to
>>> > generate custom reports.
>>> >>
>>> >> Are there any other advantages and are there any differences in the
>>> > interface between the various db's. Does the forum still recommend XML.
>>> >>
>>> >> Regards
>>> >>
>>> >> --
>>> >> Mike Stillingfleet
>>> >> mikestillingfleet at fastmail.co.uk
>>> >> _______________________________________________
>>> >> gnucash-user mailing list
>>> >> gnucash-user at gnucash.org
>>> >> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> >> -----
>>> >> Please remember to CC this list on all your replies.
>>> >> You can do this by using Reply-To-List or Reply-All.
>>> >
>>> > _______________________________________________
>>> > gnucash-user mailing list
>>> > gnucash-user at gnucash.org
>>> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> > -----
>>> > Please remember to CC this list on all your replies.
>>> > You can do this by using Reply-To-List or Reply-All.
>>> > _______________________________________________
>>> > gnucash-user mailing list
>>> > gnucash-user at gnucash.org
>>> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> > -----
>>> > Please remember to CC this list on all your replies.
>>> > You can do this by using Reply-To-List or Reply-All.
>>> > _______________________________________________
>>> > gnucash-user mailing list
>>> > gnucash-user at gnucash.org
>>> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> > -----
>>> > Please remember to CC this list on all your replies.
>>> > You can do this by using Reply-To-List or Reply-All.
>>>
>>>
>>


More information about the gnucash-user mailing list