Skip to main content

A wrapper for the python-docx library that simplifies creating Word documents in Python

Project description

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.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

docx_report-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file docx_report-0.1.0.tar.gz.

File metadata

  • Download URL: docx_report-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for docx_report-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aba52c04823602734ff14871f30a685f5fa8faa8d2641ae43e53ed1f7fff5871
MD5 c763565d1cbf2405285f8336f35774b9
BLAKE2b-256 2cee9248e6a641f4c0ac9e56a3daab65aa06e939810d51d67d0050c433bf1cb7

See more details on using hashes here.

File details

Details for the file docx_report-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: docx_report-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for docx_report-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c53c9ff671ebcd7993980f8d7393006f24b04f4684625f26a0d02411c39edd4f
MD5 a749abc6078c5a39473a9cdf2480205b
BLAKE2b-256 7119d5bd08a97192f769c6c84cbb8241db8e8f33038adb703997f817e813d860

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page