moadian2
پکیج پایتون برای اتصال به نسخه دوم (با گواهی امضا) سامانه مودیان
نصب
pip install moadian2
نحوه استفاده
from moadian2 import Moadian
with open("path/to/private.key", "rb") as key_file:
private_key = key_file.read()
with open("path/to/certificate.file", "rb") as cert_file:
certificate = cert_file.read()
moadi = Moadian("YOUR-FISCAL-ID", private_key, certificate)
ارسال صورتحساب
invoice = '{"header": {"taxid": "A278W604C8000000004744", "indatim": 1692085800000, "indati2m": 1692085803000, "inty": 1, "inno": "0000001140", "irtaxid": null, "inp": 1, "ins": 1, "tins": "10101704295", "tinb": null, "tob": 2, "bid": null, "sbc": null, "bpc": null, "bbc": null, "ft": null, "bpn": null, "scln": null, "scc": null, "crn": null, "billid": null, "tprdis": 61000000, "tdis": 0, "tadis": 61000000, "tvam": 5490000, "todam": 0, "tbill": 66490000, "setm": 2, "cap": null, "insp": 61000000, "tvop": 5490000, "tax17": null}, "body": [{"sstid": "2330000604708", "sstt": "FooBar", "am": 5, "mu": null, "fee": 12200000, "cfee": null, "cut": null, "exr": null, "prdis": 61000000, "dis": 0, "adis": 61000000, "vra": 9, "vam": 5490000, "odt": null, "odr": null, "odam": null, "olt": null, "olr": null, "olam": null, "consfee": null, "spro": null, "bros": null, "tcpbs": null, "cop": null, "vop": 5490000, "bsrn": null, "tsstam": 66490000}], "payments": []}'
moadi.send_invoice(invoice)
{"timestamp": 1722344752296, "result": [{"uid": "902bcc4e-d089-4de4-a27d-015a6cf23cba", "packetType": null, "referenceNumber": "4e9cd6e9-e0dd-4e12-bd8f-a872d84b1e54", "data": null}]}
استعلام با uid
moadi.inquiry_by_uid(["a9a63dea-5a91-4d5e-ba67-91f2358a3f0d", "7497b49d-16b4-41a3-a3fe-9e57d613a388"])
استعلام با شماره پیگیری
moadi.inquiry_by_reference_id(["a9a63dea-5a91-4d5e-ba67-91f2358a3f0d", "7497b49d-16b4-41a3-a3fe-9e57d613a388"])
دریافت اطلاعات حافظه مالیاتی
moadi.get_fiscal_information()
دریافت اطلاعات مودی
moadi.get_tax_payer("14003778990")
{"nameTrade": "پیشخوان الکترونیک ایرانیان منطقه آزاد انزلی", "taxpayerStatus": "ACTIVE", "nationalId": "14003778990"}
Metadata
Release files for moadian2 0.0.2
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 |
|---|---|---|---|---|
| moadian2-0.0.2.tar.gz | 42.9 kB | Without provenance | Details for moadian2-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| moadian2-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for moadian2-0.0.2-py3-none-any.whl |
Total release size: 73.2 kB
Release files / moadian2-0.0.2.tar.gz
| Download URL | moadian2-0.0.2.tar.gz |
|---|---|
| Size | 42.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b03b7f80c6c311a387f135f0357f00f7b1e66f99c9cb8b9a7654909bf1272bb
|
|
BLAKE2b-256 checksum How to use checksums |
d54edf2cd7dc7ca9421892f0a8c16fd16a5d65e20159c506478ea3cff452646b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / moadian2-0.0.2-py3-none-any.whl
| Download URL | moadian2-0.0.2-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d65cfa1038e15aa3012fdeb73b4a77f8739d7f0ad03218262183682b5764d510
|
|
BLAKE2b-256 checksum How to use checksums |
b6afa611d301c70fbc5850af553ab812a2d200dc140743a18983e2e63921e2ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for moadian2 0.0.2
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.