Skip to main content

No project description provided

Project description

Request Logger Module

This Python module is designed to log and store incoming HTTP requests in a Django application. It helps developers track and analyze request data, including headers, methods, and payloads.

Features

  • Log and store HTTP requests.
  • Support for GET, POST, PUT, DELETE, and other HTTP methods.
  • Ability to filter requests by method or URL.
  • Easy integration with Django projects.

Installation

  1. Install the package via pip:

    pip install request-logger
    
  2. Add request_logger to your Django INSTALLED_APPS:

    Open your settings.py file and add request_logger to the INSTALLED_APPS list:

    INSTALLED_APPS = [
        # other apps
        'request_logger',
    ]
    
  3. Add the Request Logger Middleware:

    Include the request_logger middleware in your MIDDLEWARE list in settings.py:

    MIDDLEWARE = [
        # other middleware
        'request_logger.middleware.request_logger.userLogCheck',
    ]
    
  4. Run Migrations to Create the Necessary Database Tables:

    Apply the migrations to set up the required database tables:

    python manage.py migrate
    

Usage

  1. Filter Logged Requests by Method:

    You can filter logged requests by method using the following query:

    from request_logger.models import userLog
    
    get_requests = userLog.objects.filter(method='GET')
    

License

This project is licensed under the MIT License - see the LICENSE file for details.


Request Logger Modülü

Bu Python modülü, bir Django uygulamasında gelen HTTP isteklerini kaydetmek ve saklamak için tasarlanmıştır. Geliştiricilere, başlıklar, yöntemler ve payloadlar dahil olmak üzere istek verilerini izleme ve analiz etme imkanı sunar.

Özellikler

  • HTTP isteklerini kaydetme ve saklama.
  • GET, POST, PUT, DELETE ve diÄŸer HTTP yöntemleri için destek.
  • İstekleri yöntem veya URL'ye göre filtreleme yeteneÄŸi.
  • Django projeleri ile kolay entegrasyon.

Kurulum

  1. Pip ile paketi yükleyin:

    pip install request-logger
    
  2. request_logger modülünü Django INSTALLED_APPS listenize ekleyin:

    settings.py dosyanızı açın ve INSTALLED_APPS listesine request_logger ekleyin:

    INSTALLED_APPS = [
        # diÄŸer uygulamalar
        'request_logger',
    ]
    
  3. Request Logger Middleware'ini Ekleyin:

    settings.py dosyanızda MIDDLEWARE listesine request_logger middleware'ini dahil edin:

    MIDDLEWARE = [
        # diÄŸer middleware'ler
        'request_logger.middleware.request_logger.userLogCheck',
    ]
    
  4. Gerekli Veritabanı Tablolarını Oluşturmak İçin Migrations İşlemini Çalıştırın:

    Gerekli veritabanı tablolarını oluşturmak için migrations işlemini uygulayın:

    python manage.py migrate
    

Kullanım

  1. Kaydedilen İstekleri Yönteme Göre Filtreleyin:

    Kaydedilen istekleri yöntemine göre filtreleyebilirsiniz:

    from request_logger.models import userLog
    
    get_requests = userLog.objects.filter(method='GET')
    

Lisans

Bu proje MIT Lisansı altında lisanslanmıştır - detaylar için LICENSE dosyasına bakın.

Project details


Release history Release notifications | RSS feed

This version

1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

request_logger-1.2.tar.gz (7.0 kB view details)

Uploaded Source

File details

Details for the file request_logger-1.2.tar.gz.

File metadata

  • Download URL: request_logger-1.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for request_logger-1.2.tar.gz
Algorithm Hash digest
SHA256 ca82dde850067c23ab555f23777ee46a3f44e0f69ae8d32e8a351bcdeb73d5e5
MD5 f476e28ddd09819b99bb6a8a0e728ff7
BLAKE2b-256 31310c6fdf83a2c9cd29cca72146088fdcd819670e2d8bc299be78a360c72595

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page