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 hashes)
Built Distribution
Close
Hashes for docx_report-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bad56a4f7b50270cf9d72f35b1cd7045f850c8e58c96ced03cb57f4255912e72 |
|
MD5 | 719fc5647a98c1e720a95d6e140ef15b |
|
BLAKE2b-256 | e0a64e5e3998f3a0940c21dbe65f169add1cef27bd3e0d55955ed12d661e6459 |