Thanks Joshua, I added a link to the contrib doc.
As for stubs, if you wanted to contribute something like that to the
Beancount repo that would be welcome.
I'd recommend doing the changes to the Python interfaces directly rather
than use .pyi files.



On Tue, Feb 1, 2022 at 10:24 AM Joshua Gilman <[email protected]>
wrote:

> While working on an HTTP API backend for beancount, I decided to extract
> my Pydantic models out into their own package since I believe some people
> may find it useful to represent core beancount types as Pydantic models.
>
> bdantic: https://github.com/jmgilman/bdantic
>
> Probably the most useful thing out of the box is you can represent your
> entire ledger as JSON:
>
> from beancount import loaderfrom bdantic import parse_loader
> result = parse_loader(*loader.load_file("testing/static.beancount"))
> print(result.json())
>
> While every model is heavily tested with hypothesis, I've only ingested a
> few generated beancount ledgers and my own personal one, so there may be
> additional kinks that need working out.
>
> Additionally, in tandem with the above, I started working out some type
> stub files for beancount: https://github.com/jmgilman/beancount-stubs.
> It's still very incomplete but I tried at least getting the core package
> stubbed out. PRs are welcome for either package :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAJuQ%3DO0Mj31fONx95qy71vNEij0Uw65%3D-MebhQdeEBrqDQc_%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAJuQ%3DO0Mj31fONx95qy71vNEij0Uw65%3D-MebhQdeEBrqDQc_%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO-n7iK5gErSrMDc-KBpMEJQRzsb2hjxs%2BdbkhGFB9%2BGw%40mail.gmail.com.

Reply via email to