Skip to content

Commit

Permalink
update: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaman-awasthi committed Oct 28, 2023
1 parent 56d32cc commit dfc90c8
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 3 additions & 3 deletions sql-package/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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:**

Expand Down
Binary file added sql-package/dist/sql-inspector-0.5.tar.gz
Binary file not shown.
Binary file removed sql-package/dist/sql-inspector-1.0.0.3.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion sql-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
33 changes: 31 additions & 2 deletions sql-package/sql_inspector.egg-info/PKG-INFO
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
Expand All @@ -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

Expand Down Expand Up @@ -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!


0 comments on commit dfc90c8

Please sign in to comment.