{"id":27867507,"url":"https://github.com/ari/moneyworks-cli","last_synced_at":"2025-07-21T04:33:07.090Z","repository":{"id":57442892,"uuid":"57865406","full_name":"ari/moneyworks-cli","owner":"ari","description":"A python API for Cognito's Moneyworks accounting software","archived":false,"fork":false,"pushed_at":"2019-01-15T02:59:27.000Z","size":30,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T05:42:06.809Z","etag":null,"topics":["cognito-moneyworks-accounting","invoice","moneyworks-cli","payroll","python","python-api"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ari.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-02T04:12:49.000Z","updated_at":"2019-01-15T02:59:28.000Z","dependencies_parsed_at":"2022-09-04T23:00:15.656Z","dependency_job_id":null,"html_url":"https://github.com/ari/moneyworks-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ari/moneyworks-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ari%2Fmoneyworks-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ari%2Fmoneyworks-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ari%2Fmoneyworks-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ari%2Fmoneyworks-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ari","download_url":"https://codeload.github.com/ari/moneyworks-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ari%2Fmoneyworks-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266240927,"owners_count":23898062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cognito-moneyworks-accounting","invoice","moneyworks-cli","payroll","python","python-api"],"created_at":"2025-05-04T22:47:35.377Z","updated_at":"2025-07-21T04:33:07.075Z","avatar_url":"https://github.com/ari.png","language":"Python","readme":"# Moneyworks CLI\n\nA python API for Cognito's Moneyworks accounting software\n\nA library for python to make it easier to export, import and print data from Moneyworks. Some typical uses include:\n\n* Automatically creating invoices each month, posting them and emailing the pdf\n* Importing payroll data from Xero, creating super transactions, payroll and petty cash.\n* Importing data from other systems on a regular basis\n* Performing data checks on a regular basis\n\n# Requirements\n\nCognito Moneyworks with an available REST user enabled on a port of your choice. We have only tested this library with Moneyworks Server, but it may work with the standalone version.\n\nYou'll need python 3.5 or above.\n\n# Installing\n\nInstall with pip.\n\n    pip install moneyworks\n\nCopy the mw.ini file to your local folder and edit to you needs. You'll also need to ensure this user is given appropriate rights inside Moneyworks. Unfortunately due to limitations in Moneyworks, if you try this library with a user who doesn't have sufficient rights, random things happen. For example, printing an unposted invoice from a user without that right results in a blank PDF but no error. In other cases unhelpful 500 errors are returned without any information.\n\n# How to use\n\n    from moneyworks import Moneyworks\n    mw = Moneyworks()\n    \n    # Print the version of Moneyworks we are talking to\n    print mw.version()\n    \n    # Get the email address of the first person in a company, selected by code\n    print mw.get_email(\"ACME\")\n\n    # Get a PDF document (which you can save or email) of a transaction\n    pdf = mw.print_transaction('sequencenumber=`9999`', 'my_invoice')\n    \n    # Export some data for all companies with code starting with 'A' and print their names\n    my_data = mw.export(\"name\", \"left(code, 1)=`A`\")\n    for contact in my_data:\n      print contact['name']\n\n## Advanced usage\n\nLet's see how we might import some data, generate invoices, post them, print an invoice and email that\n\n    from moneyworks import Moneyworks, Transaction, Email\n\n    mw = Moneyworks('/etc/mw.ini')\n    e = Email()\n\n    t = Transaction()\n    t.add(\"type\", \"DI\")\n    t.add(\"theirref\", \"1234\")\n    t.add(\"transdate\", datetime.date.today().replace(day=1))  # First of the month\n    t.add(\"NameCode\", \"ACME\")\n    t.add(\"description\", \"Monthly services\")\n    t.add(\"tofrom\", \"Acme Pty Ltd\")\n    t.add(\"duedate\")\n    t.add(\"duedate\")\n    t.add(\"contra\")\n    t.add(\"ourref\")\n\n    l = t.add_line()\n    l.add(\"detail.account\", \"4100\")\n    l.add(\"detail.net\", 1300.35)\n    l.add(\"detail.description\", \"Services\")\n    l.add(\"detail.taxcode\")\n    l.add(\"detail.tax\")\n    l.add(\"detail.gross\")\n\n    invoice_sequence = mw.create_transaction(t.to_xml())\n    result = mw.post_transaction(invoice_sequence)\n    pdf = mw.print_transaction('sequencenumber=`' + invoice_sequence + \"`\", 'my_invoice')\n\n    email = mw.get_email(\"ACME\")\n    e.send_mail(email, \"invoice\", \"Please send us some money.\", pdf, \"invoice.pdf\")\n        \n        \n\n# License\n\nThis library is licensed under the Apache Public License 2. Contributions and enhancements are welcome.\n\n# For developers\n\nIn order to publish a new version of this module, edit setup.py with the new version number then run:\n\n    rm -fr dist/*\n    python3 setup.py sdist\n    twine upload dist/*","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fari%2Fmoneyworks-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fari%2Fmoneyworks-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fari%2Fmoneyworks-cli/lists"}