A python package about automatic report, include automatic docx, automatic xlsx, and business rule sql engine.
Project description
from cloze.pandas_query import PandasQuery import pandas
data1=pandas.DataFrame({"列1": range(100),"y": range(100)}) data2=pandas.DataFrame({"x": range(100),"y": range(100)})
sql='select data1.,data2. from data1,data2 where data1.y=data2.y;'
query=PandasQuery() result=query(sql, {'data1':data1,'data2':data2})
#%% from cloze.template_docx import TemplateDocx import pandas import matplotlib.pyplot as plt from io import BytesIO
data1=pandas.Series(range(100),index=['a%i'%i for i in range(100)]) data2=pandas.DataFrame({"x": range(10),"y": range(10)})
plot=BytesIO() plt.plot(data2.y) plt.savefig(plot)
ax = data2.y.plot() fig = ax.get_figure() fig.savefig(plot)
template=TemplateDocx() template('Template.docx','Save.docx',env={'data1':data1,'data2':data2,'plot':plot})
#%% from cloze.template_xlsx import TemplateXlsx import pandas import matplotlib.pyplot as plt from io import BytesIO
data1=pandas.Series(range(100),index=['a%i'%i for i in range(100)]) data2=pandas.DataFrame({"x": range(10),"y": range(10)})
plot=BytesIO()
plt.plot(data2.y) plt.savefig(plot)
data2.y.plot().get_figure().savefig(plot)
template=TemplateXlsx(restore=False) template('Template.xlsx','Save.xlsx',env={'data1':data1,'data2':data2,'plot':plot})
template=TemplateXlsx(restore=True) template('Template.xlsx','Save.xlsx',env={'data1':data1,'data2':data2,'plot':plot}) #%% from cloze.template_text import TemplateText import pandas template=TemplateText() template('这是一个测试{data.a}',{'data':pandas.Series({'a':1})})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloze-0.3.0.tar.gz.
File metadata
- Download URL: cloze-0.3.0.tar.gz
- Upload date:
- Size: 381.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd6ace165c58da4c66680fc9f084ade5ae6fe69dda717d6d91128d5c03987811
|
|
| MD5 |
a51305963eaf5ecb2a61daecc1d8eb76
|
|
| BLAKE2b-256 |
213fc4b4e524bc663936996ff4fb6577839a10b96a7eb0e260cb9b746840808f
|
File details
Details for the file cloze-0.3.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: cloze-0.3.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 277.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc7e2ff1eb88a14491e40a9109709a2046065cf02e118b2ced44f9c2dcc11379
|
|
| MD5 |
a35fc6e97dc186bfc4580f2330cfe98d
|
|
| BLAKE2b-256 |
014ee241e85a9f2e24d15e866e570613027cae8525634bd08a9b6b5d2a4fe596
|
File details
Details for the file cloze-0.3.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: cloze-0.3.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 198.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2298cd850f573cc04fdbdcca13d0e6997b6d3282e556280540d63c129aa4a83
|
|
| MD5 |
61a2d35ceeaf369af0f159c0214118b6
|
|
| BLAKE2b-256 |
cacd3ddc9cbe6eefd7ab9cd2cc926ec18d6d2ddb5a31f0bb636636d453682aa7
|
File details
Details for the file cloze-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: cloze-0.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e92fee1bde378d1845703ad13ba43af6dd3cc5dda17bce35b01069b165bc2bfa
|
|
| MD5 |
257119ab23697c8d2708b4dc518d7b39
|
|
| BLAKE2b-256 |
58eb62cdd3307cba0ac88f42ecc7b2780d8bf6b52c25f27d23c74456cc002562
|