A useful simple to use tool to turn your sql query into a beautiful report html table
Project description
This is easy to use tool for generating html table from sql query.
the packes contains only one function named "generateFromSql" with 8 arguments :
- session : SQLAlchemy session
- title : the title of the report that will be shown on top of table
- sqltext : the sql query
- footerCols : a list of columns name that you want to have Sum of values on footer . Example : ['amount','price']
- direction (default = "ltr") : indicates direction of the report page. "ltr"- Left to Right , "rtl" - Right to Left
- font (default = "Tahoma") : font of title and table contents
- totalText (default = "Total") : title of footer row that will be the put below the first column.
- rowIndex (default = False) : indicates whether the table should have index column or not.
usage :
from flask_sqlalchemy_report import Reporter
@app.route('/listOfPersons', methods=['GET']) def listOfPersons():
return Reporter.sqlPrinter(db.session, "Employee List","SELECT FirstName as 'First Name', LastName as 'Last Name', phone as 'Phone Number', salary as 'Salary' FROM persons", ['Salary'], "rtl", "Arial", "Total Salary", True)
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
Built Distribution
Close
Hashes for flask_sqlalchemy_report-0.1.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaf701fb0ad3673459f8da1c5f5f646ae03b94e0e1ff31315f8bda88043ffd66 |
|
MD5 | b40658c0bb69190957426194e127bb37 |
|
BLAKE2b-256 | 54455287df140f9552e3b44f81212d7a7c4c4581c31f9665bae1e98325abff4d |
Close
Hashes for flask_sqlalchemy_report-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0790a51f9d5170a94295ebf15fbc943f9a78f53b6ccd3b1ef5bed66e63cdff1 |
|
MD5 | daafb8fac6cbaecd011fb792f83579f8 |
|
BLAKE2b-256 | ae7f1fb44589ee6f0175d0d0211710d1eccf861b8efea35a7d294f318c25e862 |