Debts settlement
A simple library and cli-tool to help you solve some debts settlement scenarios.
Installation
From a command-line interface, run:
$ pip install debts
From the command-line
You can invoke the solver from the command-line. To do so, you need to pass it the arguments in a specific way:
$ debts --settle "Emeline -200, Alexis -400, Rémy +500, Alexis +100" Emeline → Rémy: 200.0 Alexis → Rémy: 300.0
You can also read from a JSON file:
$ debts --settle data.json --parser=json
And optionally render a HTML table with the results:
$ debts --settle data.json --parser=json --renderer=html > index.html
Which should look like this:
As a library
If you want to use it as a library, here is how it works:
>>> from debts import settle
>>> settle([('Emeline', -200), ('Alexis', -400), ('Rémy', +500), ('Alexis', +100)])
[('Emeline', 200.0, 'Rémy'), ('Alexis', 300.0, 'Rémy')]
That’s all folks!
Testing
Everything is tested and should work. If it doesn’t, please take the time to open an issue here! Thanks :-)
To run the tests yourself:
$ pip install -e . $ pip install -r dev-requirements.txt $ py.test tests
Metadata
Release files for debts 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| debts-0.5.tar.gz | 3.9 kB | Without provenance | Details for debts-0.5.tar.gz |
Release files / debts-0.5.tar.gz
| Download URL | debts-0.5.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f239fa356500b0cc7d2334a6ad45dcaf542796f759ca44052c59566afca8e5f8
|
|
BLAKE2b-256 checksum How to use checksums |
8e5484a0d3a7aad206dfe4d2b12e3f8f2758ad7c39a78f33a4247793f074ae57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Security for debts 0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.