Metadata-Version: 2.1
Name: django-sql-profiler
Version: 0.0.14
Summary: Simple SQL Profiler for Django
Home-page: UNKNOWN
Author: David (thinhit@yahoo.com)
License: UNKNOWN
Description: # Django SQL Profiler
        
        **Project Description:**
        Django SQL Profiler is a lightweight package inspired by the Sentry SDK. It allows you to effortlessly capture all SQL statements generated by your Django application and store them in MongoDB. To use this package, ensure that you have PyMongo installed.
        
        **How to Use:**
        
        1. **Installation:**
            ```bash
            pip install django-sql-profiler
            ```
        
        2. **Initialization:**
            Import the `sql_profiler` module and call the `install_sql_hook` function with the desired configuration options. Example:
            ```python
            from django_sql_profiler import install_sql_hook
        
            sql_profiler.install_sql_hook(
                {
                    'slow_queries_threshold': 0.2,
                    'app_namespace': ['apps.'],
                    'mongodb': {
                        'uri': MONGODB,
                        'db': MONGODB_DB,
                        'collection': 'sql_slow_queries'
                    }
                }
            )
            ```
        
        3. **Configuration Options:**
        
            - `slow_queries_threshold` (float): Set the threshold for slow queries in seconds.
            
            - `app_namespace` (list): Specify the namespaces of your Django apps to filter SQL statements.
            
            - `mongodb` (dict): Configure MongoDB connection details.
                - `uri` (str): MongoDB connection URI.
                - `db` (str): MongoDB database name.
                - `collection` (str): MongoDB collection to store SQL slow queries.
        
        
        4. **Note:**
            Ensure that PyMongo is installed in your environment before using this package.
        
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
