Usage
import
import q2data2docx.q2data2docx
merge local files
d2d = q2data2docx.q2data2docx.q2data2docx()
d2d.loadJsonFile("your-file-name.json") # JSON data file
# or
d2d.loadJsonFile("your-file-name.xlsx") # XLSX data file
d2d.loadDocxFile("your-file-name.docx") # DOCX template file
if d2d.merge():
d2d.saveFile("result")
if d2d.merge():
d2d.saveFile("result")
or
q2data2docx.q2data2docx.merge("your-file-name.docx", "your-file-name.json", "result")
# or
q2data2docx.q2data2docx.merge("your-file-name.docx", "your-file-name.xlsx", "result")
merge data from memory
d2d = q2data2docx.q2data2docx.q2data2docx()
d2d.setJsonBinary(open("your-file-name.json", "rb").read())
# or
d2d.setXlsxBinary(open("your-file-name.xlsx", "rb").read())
d2d.setDocxTemplateBinary(open("your-file-name.docx", "rb").read())
if d2d.merge():
d2d.saveFile("result")
or
d2d = q2data2docx.q2data2docx.q2data2docx(
docxTemplateBinary=open("your-file-name.docx", "rb").read(),
jsonBinary=open("your-file-name.json", "rb").read(),
)
# or
d2d = q2data2docx.q2data2docx.q2data2docx(
docxTemplateBinary=open("your-file-name.docx", "rb").read(),
xlsxBinary=open("your-file-name.xlsx", "rb").read(),
)
if d2d.merge():
d2d.saveFile("result")
Metadata
Release files for q2data2docx 0.1.38
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 |
|---|---|---|---|---|
| q2data2docx-0.1.38.tar.gz | 16.5 kB | Without provenance | Details for q2data2docx-0.1.38.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| q2data2docx-0.1.38-py3-none-any.whl | Python 3 | none | any | Details for q2data2docx-0.1.38-py3-none-any.whl |
Total release size: 34.0 kB
Release files / q2data2docx-0.1.38.tar.gz
| Download URL | q2data2docx-0.1.38.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
326e0ef2b29915b5627ecfe2a22f851ee6bc429cfc79b89125b27500fe1be946
|
|
BLAKE2b-256 checksum How to use checksums |
3894eb2d002fce53e69bbf8778454e3d846ef53ff67374a51242b2eb40583050
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.7 Windows/10
|
Release files / q2data2docx-0.1.38-py3-none-any.whl
| Download URL | q2data2docx-0.1.38-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4c5393dc07bfc1417203ddac9601896e4fde9c2cb67e99e3b49e482a1d06eff
|
|
BLAKE2b-256 checksum How to use checksums |
742527022895f987f612c3da7055aca15bff5b0a328f1796377ee1c12baf86e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.7 Windows/10
|
Security for q2data2docx 0.1.38
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.