Skip to main content

A python package about automatic report, include automatic docx, automatic xlsx, and business rule sql engine.

Project description

from auto_rpt.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 auto_rpt.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 auto_rpt.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 auto_rpt.template_text import TemplateText import pandas template=TemplateText() template('这是一个测试{data.a}',{'data':pandas.Series({'a':1})})

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

cloze-0.2.0.tar.gz (381.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cloze-0.2.0-cp312-cp312-win_amd64.whl (277.5 kB view details)

Uploaded CPython 3.12Windows x86-64

cloze-0.2.0-cp311-cp311-win_amd64.whl (198.6 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file cloze-0.2.0.tar.gz.

File metadata

  • Download URL: cloze-0.2.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

Hashes for cloze-0.2.0.tar.gz
Algorithm Hash digest
SHA256 daa9b96e0312e950e01f3e57ef07f88468c03f77c4ddcb30cd4dcea8a736404c
MD5 76db99d4d061d5fc05c2d8d8a13291c9
BLAKE2b-256 254b0300c292fdbf159b37b82f76171ec77a3fb695b8f47a37504f3dd6dafdcd

See more details on using hashes here.

File details

Details for the file cloze-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cloze-0.2.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

Hashes for cloze-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 75385ac437547b6d0938b6ab85e23dc024cc57d9da9fd893c548f60ad2d481fb
MD5 c6bd9eeeb5c1f276d66257212c7004f6
BLAKE2b-256 625349a77550493f602b785496fbd86b91c0fca18805d6784898d0e88a4757b3

See more details on using hashes here.

File details

Details for the file cloze-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cloze-0.2.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

Hashes for cloze-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b5d241f167b7bcb36a8e6ed2032d122f8014e3a4d74976dc8ade23094ba65f57
MD5 0592ca1f5e8f87f98506bd5b1f3edc91
BLAKE2b-256 1df7acbcddfa9c8d7235db23e53bb4d861c14945fcb9866b3031bb0503a8cec6

See more details on using hashes here.

Supported by

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