Skip to main content

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

Project description

https://codecov.io/gh/christopher-hacker/docx-report/branch/main/graph/badge.svg?token=019MXVQYN5 tests PyPI version

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

Uploaded Source

Built Distribution

docx_report-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docx_report-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 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.1.tar.gz
Algorithm Hash digest
SHA256 cbac7578ce918a9708df0c16a1d21fdc7aabd540edb8854c430a1862cba87727
MD5 f3b41212d28161297ac1fd1091095736
BLAKE2b-256 e054ce9684adffcb6197243fe9a5bab01dc65d40df986c979b146a2bb157e4cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docx_report-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 945cb6298a01479ffd42d637dcf1e4cdf361cf68301800f94f4f981098a64aa1
MD5 e0dad5cb4aa9f7cdc73b8650196e6fa3
BLAKE2b-256 76161d7302a2eefe27ad2ea96c5cdfabdfe83736d0fd1455de1831365ba3b902

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