Skip to main content

Downloads

Flask_SqlAlchemy_Report is an easy to use tool for generating html table from sql query.

The package contains single function named "generateFromSql" which accepts 11 arguments :

  • session : SQLAlchemy session
  • title : The title of the report that will be shown on top of table
  • sqltext : The sql select query to retrieve data
  • 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.
  • headerRowColor (default = '#eeeeee') : The header (title) row background color.
  • evenRowColor (default = '#ffffff') : The even rows background color.
  • oddRowColor (default = '#ffffff') : The odd rows background color.

Installation

To install flask_sqlalchemy using pip :

pip install flask-sqlalchemy-report

Usage :

from flask_sqlalchemy_report import Reporter 

@app.route('/listOfPersons', methods=['GET'])
def listOfPersons():
  reportTitle = "Employee List"
  sqlQuery = "SELECT FirstName as 'First Name', LastName as 'Last Name', phone as 'Phone Number', salary as 'Salary' FROM persons"
  columnsToBeSummarized = ['Salary']
  fontName = "Arial"
  headerRowBackgroundColor = '#ffeeee'
  evenRowsBackgroundColor = '#ffeeff'
  oddRowsBackgroundColor = '#ffffff'
  rowIndexVisibility = True
  footerSummaryTitle = "Total Salary"
  return Reporter.generateFromSql(db.session, reportTitle, sqlQuery, columnsToBeSummarized, 
                                  "ltr", fontName, footerSummaryTitle, rowIndexVisibility,
                                  headerRowBackgroundColor, evenRowsBackgroundColor, oddRowsBackgroundColor
                                  )
   

See More

Read more about flask_sqlalchemy_report here

Metadata

Release files for flask-sqlalchemy-report 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-sqlalchemy-report 0.2.4
File Size Uploaded Provenance Actions
flask_sqlalchemy_report-0.2.4.tar.gz 3.6 kB Without provenance Details for flask_sqlalchemy_report-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flask-sqlalchemy-report 0.2.4
File Interpreter ABI Platform Actions
flask_sqlalchemy_report-0.2.4-py3-none-any.whl Python 3 none any Details for flask_sqlalchemy_report-0.2.4-py3-none-any.whl

Total release size: 7.8 kB

Release files / flask_sqlalchemy_report-0.2.4.tar.gz

Download URL flask_sqlalchemy_report-0.2.4.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7ee17dbc15d849c897153b093f4929cf0ac2aacffa211de0f3c640aca606eff6
BLAKE2b-256 checksum
How to use checksums
393d3f8bf6f0b7552475927d0cd127214935e5aa34c18edbfeee8d024f81b154
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / flask_sqlalchemy_report-0.2.4-py3-none-any.whl

Download URL flask_sqlalchemy_report-0.2.4-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eec7ae43d9659c6cd9f4ffb04f40cc502996a50ebe55f5a920319e07f707bf09
BLAKE2b-256 checksum
How to use checksums
096205cd4e515056b90c256e396b007d5e67284c179f54016ac1c1a24fbbecce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for flask-sqlalchemy-report 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page