-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56d32cc
commit dfc90c8
Showing
8 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
License: MIT | ||
|
@@ -13,7 +13,7 @@ Requires-Dist: sqlparse>=0.4.4 | |
|
||
# SQLInspector Middleware for Django | ||
|
||
[](https://pypi.org/project/sqlinspector/) | ||
[](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! | ||
|
||
|