Python interface for IARP's myDATA service
Project description
CLI / HTTP client for myDATA
This project allows users to interact with myDATA ("my Digital Accounting and Tax Application") either via a Python HTTP client or from the CLI.
Install
Install it with pip
:
python -m pip install mydata-client
Usage
[!WARNING] The tool is not suitable yet for production use. We strongly suggest that you use it for experimenting only with the development sandbox that myDATA provides.
[!NOTE] Oh, you may also find the docs a bit... lacking :grimacing:
If you want to interact programmatically with myDATA's API, you can use the HTTP
client under mydata/client.py
. The Python dataclasses that bind to XML
documents can be found in the mydata/models*
modules, depending on which
version of the API you want to use.
There is also a proof-of-concept CLI that you can use:
mydata --username <username> <command>
There are two command groups that you can invoke:
- The
api
command group, which is unopinionated and straight up hits the endpoint that you ask. - The
invoice
command group, which is heavily opinionated and adds some helper commands to work with invoices. Basically, it's there to assist the list -> retrieve -> copy -> edit -> validate -> send lifecycle of an invoice.
Building
Install Poetry. Then, install the project dependencies:
poetry install
Adding new XSD schemas
Whenever there's an API update, myDATA devs include the XML schemas for the latest API. You can include them in the project as follows:
-
Add the XML schemas under
schemas/<version>
dir. For example, for the 1.0.8 XSDs, we added them with:cp -r '/path/to/version v1.0.8 XSDs' schemas/1.0.8
-
Remove the previously generated
mydata/__init__.py
module:rm mydata/__init__.py
-
Generate Python classes from the new XSDs. For example, for the 1.0.8 XSDs, we generated Python classes with:
poetry run xsdata -ss single-package -ds Google -r schemas/1.0.8/ -p mydata.models_v1_0_8
-
Generate Markdown documentation from the generated Python classes with:
poetry run pydoc-markdown -m mydata.models_v1_0_8 --render-toc > docs/models_v1_0_8.md
License
Licensed under MPL-2.0. Please read the NOTICE.md
and
LICENSE
files for the full copyright and license information.
Useful links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mydata_client-0.2.0.tar.gz
.
File metadata
- Download URL: mydata_client-0.2.0.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ac544405ef06bf0df915fced7d10d600fa56ca505f9d8200b2145037025751e |
|
MD5 | 6126327e925e9c323dac29893fb57296 |
|
BLAKE2b-256 | 908994d7dab701cd1fb4ae149d247e145fb27b57c5dea6851052e1be707f7580 |
Provenance
The following attestation bundles were made for mydata_client-0.2.0.tar.gz
:
Publisher:
pypi.yml
on apyrgio/mydata
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
mydata_client-0.2.0.tar.gz
- Subject digest:
0ac544405ef06bf0df915fced7d10d600fa56ca505f9d8200b2145037025751e
- Sigstore transparency entry: 146551182
- Sigstore integration time:
- Predicate type:
File details
Details for the file mydata_client-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mydata_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 46.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d61bfd63016308567bb489521ab3cedc465baf49a61e0e3dcf69395ec23fb5c2 |
|
MD5 | ce021f2b7899341c7834fd742f864857 |
|
BLAKE2b-256 | 3c5b0fb0784e87f1c597361db494b5fc14c188e15f3007fd27dab3eeb6447bc4 |
Provenance
The following attestation bundles were made for mydata_client-0.2.0-py3-none-any.whl
:
Publisher:
pypi.yml
on apyrgio/mydata
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
mydata_client-0.2.0-py3-none-any.whl
- Subject digest:
d61bfd63016308567bb489521ab3cedc465baf49a61e0e3dcf69395ec23fb5c2
- Sigstore transparency entry: 146551187
- Sigstore integration time:
- Predicate type: