diff --git a/README.md b/README.md index 5e59eaa..7fac225 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ To install the SQLInspector middleware via pip, use: pip install -i https://test.pypi.org/simple/ sql-inspector ``` -# How to Use +## How to Use Integrating SQLInspector into your Django project is straightforward. Once you've installed the middleware, the next steps ensure its proper functioning: diff --git a/sql-package/README.md b/sql-package/README.md index 49df5d9..b2099e5 100644 --- a/sql-package/README.md +++ b/sql-package/README.md @@ -1,6 +1,6 @@ # SQLInspector Middleware for Django -[![Version](https://img.shields.io/badge/version-1.0.0.3-brightgreen)](https://pypi.org/project/sqlinspector/) +[![Version](https://img.shields.io/badge/version-0.5-brightgreen)](https://pypi.org/project/sqlinspector/) ## Description @@ -31,11 +31,11 @@ To install the SQLInspector middleware via pip, use: pip install -i https://test.pypi.org/simple/ sql-inspector ``` -# How to Use +## How to Use Integrating SQLInspector into your Django project is straightforward. Once you've installed the middleware, the next steps ensure its proper functioning: -## Integration Steps: +### Integration Steps: 1. **Add to MIDDLEWARE in settings.py:** diff --git a/sql-package/dist/sql-inspector-0.5.tar.gz b/sql-package/dist/sql-inspector-0.5.tar.gz new file mode 100644 index 0000000..4b25afd Binary files /dev/null and b/sql-package/dist/sql-inspector-0.5.tar.gz differ diff --git a/sql-package/dist/sql-inspector-1.0.0.3.tar.gz b/sql-package/dist/sql-inspector-1.0.0.3.tar.gz deleted file mode 100644 index f537fe5..0000000 Binary files a/sql-package/dist/sql-inspector-1.0.0.3.tar.gz and /dev/null differ diff --git a/sql-package/dist/sql_inspector-0.5-py3-none-any.whl b/sql-package/dist/sql_inspector-0.5-py3-none-any.whl new file mode 100644 index 0000000..e132b78 Binary files /dev/null and b/sql-package/dist/sql_inspector-0.5-py3-none-any.whl differ diff --git a/sql-package/dist/sql_inspector-1.0.0.3-py3-none-any.whl b/sql-package/dist/sql_inspector-1.0.0.3-py3-none-any.whl deleted file mode 100644 index 83534b6..0000000 Binary files a/sql-package/dist/sql_inspector-1.0.0.3-py3-none-any.whl and /dev/null differ diff --git a/sql-package/pyproject.toml b/sql-package/pyproject.toml index 93927db..73d6193 100644 --- a/sql-package/pyproject.toml +++ b/sql-package/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "sql-inspector" -version = "1.0.0.3" +version = "0.5" description = "A django middleware package to print out queries in the terminal" license = { text = "MIT" } authors = [ diff --git a/sql-package/sql_inspector.egg-info/PKG-INFO b/sql-package/sql_inspector.egg-info/PKG-INFO index 0588b78..ca57437 100644 --- a/sql-package/sql_inspector.egg-info/PKG-INFO +++ b/sql-package/sql_inspector.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: sql-inspector -Version: 1.0.0.3 +Version: 0.5 Summary: A django middleware package to print out queries in the terminal Author-email: Aryaman Awasthi License: MIT @@ -13,7 +13,7 @@ Requires-Dist: sqlparse>=0.4.4 # SQLInspector Middleware for Django -[![Version](https://img.shields.io/badge/version-1.0.0.3-brightgreen)](https://pypi.org/project/sqlinspector/) +[![Version](https://img.shields.io/badge/version-0.5-brightgreen)](https://pypi.org/project/sqlinspector/) ## Description @@ -42,3 +42,32 @@ To install the SQLInspector middleware via pip, use: ```bash pip install -i https://test.pypi.org/simple/ sql-inspector +``` + +## How to Use + +Integrating SQLInspector into your Django project is straightforward. Once you've installed the middleware, the next steps ensure its proper functioning: + +### Integration Steps: + +1. **Add to MIDDLEWARE in settings.py:** + + After you have installed the SQLInspector via pip, you need to add it to your Django application's `MIDDLEWARE` settings. + + Open your `settings.py` file and locate the `MIDDLEWARE` section. Add the following line: + + ```python + 'sql-inspector.middleware.querychecker_middleware', + ``` + + Ensure you add it in the appropriate order. For instance, if you have other middleware that processes database queries, you might want to adjust the order to ensure SQLInspector captures the raw queries before any other processing takes place. + +2. **Monitor Your Queries:** + + With SQLInspector now integrated, you can monitor, analyze, and optimize your SQL queries in real-time as your application runs. + +Remember, SQLInspector doesn't just capture the queries; it provides valuable insights into their performance and efficiency. By understanding the underlying SQL, you can make the necessary adjustments to your Django ORM operations, ensuring optimal database interactions. + +Happy optimizing! + +