Metadata-Version: 2.1
Name: database_reporting_utils
Version: 0.1.3
Summary: Collection of Python utils for executing queries and generating report files.
Home-page: https://github.com/jai-python3/database-reporting-utils
Author: Jaideep Sundaram
Author-email: jai.python3@gmail.com
Keywords: database_reporting_utils
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
License-File: AUTHORS.rst
Requires-Dist: Click>=7.0
Requires-Dist: PyYAML
Requires-Dist: pyodbc
Requires-Dist: Rich

========================
Database Reporting Utils
========================
Collection of Python utils for executing queries and generating report files.

Exported Scripts
----------------

* run-queries

Usage
-----

Install the package
-------------------

.. code-block:: shell

    pip install database-report-utils

Create the .env file
--------------------

.. code-block:: bash

    DB_SERVER = localhost
    DB_DATABASE = mydatabase
    DB_USERNAME = root
    DB_PASSWORD = root
    DB_DRIVER = ODBC Driver 17 for SQL Server

Create the queries file
-----------------------

my_queries.sql

.. code-block:: sql

    SELECT COUNT(*) 
    FROM table1
    WHERE column1 = "condition-1";

    SELECT COUNT(*) 
    FROM table2
    WHERE column2 = "condition-2";

Execute queries and generate report
-----------------------------------

.. code-block:: shell

    run-queries --infile my_queries.sql


=======
History
=======

0.1.0 (2025-02-08)
------------------

* First release on PyPI.
