Metadata-Version: 2.1
Name: xl-reports
Version: 0.1.3
Summary: Generate reports from a excel file and some data.
Home-page: https://github.com/sparkgeo/xl-reports
License: MIT
Author: Dustin Sampson
Author-email: dustin@sparkgeo.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: mypy (>=0.971,<0.972)
Requires-Dist: openpyxl (>=3.0.10,<4.0.0)
Description-Content-Type: text/markdown

XL Reports
----------

Generate Excel reports!

1. Create an Excel template file
2. Define a report configuration
3. Fetch your data
4. Generate report


## Report Configuration Schema

Report configuration is defined as array/list of objects/dicts.


**"cell"**: <string> Worksheet cell coordinates to insert data, example: `"B2"`

**"range"**: <string> Worksheet coordinate range to insert data. Range start coordinate is required and end coordinate is optional. examples: `"B2:"` or `"B2:C5"`

**"data_key**": <string> Key to use when fetching values from the data dictionary to insert into the worksheet. example: `data["report_date"]`

**"sheet"**: <string> Worksheet name.


**Example configuration**

```
[
    {
        "cell": "B2",
        "data_key": "account",
        "sheet": "my_sheet"
    },
    {
        "cell": "B4",
        "data_key": "report_date",
        "sheet": "my_sheet"
    },
    {
        "range": "A8",
        "data_key": "report_data",
        "sheet": "my_sheet"
    }
]
```

**Example data**

```
[{
    "account": "Engineering",
    "report_date": str(date.today()),
    "report_data": [
        [23.43, 11.96, 9.66],
        [6.99, 65.87, 45.33],
    ]
}]
```
