A wrapper for the python-docx library that simplifies creating Word documents in Python
Project description
docx-report
This is a simple wrapper for the python-docx package that makes creating Word documents in Python easier. It contains convenience methods for creating tables and inserting data visualizations directly from Pandas dataframes, as well as simpler syntax for generally writing text to a document.
Installation
pip install docx-report
Usage
from docx_report import DocxReport
# Create a new document
doc = DocxReport(title="My Report")
# Add a heading
doc.add_heading("My Heading")
# Add a paragraph
doc.add_paragraph("This is a paragraph.")
# Add a table
doc.add_table(df) # assuming you have a pandas dataframe called df
# Add a plot
doc.add_plot(df) # assuming you have a pandas dataframe called df
# Save the document
doc.save("my_report.docx")
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
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
docx_report-0.1.3.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file docx_report-0.1.3.tar.gz
.
File metadata
- Download URL: docx_report-0.1.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab89af5899b64d441ed81d416fedce2fa13ed1413dca906e10df33b05200b551 |
|
MD5 | df8a3f4850c39819f0625a53be8427cd |
|
BLAKE2b-256 | d510ca8de8a4bf4de0931fceeeab299459ae9f70956500cebdffd09da071858e |
File details
Details for the file docx_report-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: docx_report-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bad56a4f7b50270cf9d72f35b1cd7045f850c8e58c96ced03cb57f4255912e72 |
|
MD5 | 719fc5647a98c1e720a95d6e140ef15b |
|
BLAKE2b-256 | e0a64e5e3998f3a0940c21dbe65f169add1cef27bd3e0d55955ed12d661e6459 |