Skip to content
Release

CodeGenome is on PyPI — give your AI agents a live knowledge graph of your codebase. Details →

Ogro Projukti

Django UDP Discovery

Production

Ogro Projukti · Open Source Libraries

Let clients find your Django server on the LAN — no hardcoded IPs.

GitHub stars
4
License
MIT
Install
pip install django-udp-discovery

>About Django UDP Discovery

django-udp-discovery adds UDP-based service discovery to any Django project. When Django starts, a background thread listens on a UDP port; clients on the same network broadcast a discovery message and receive the server's IP address in reply.

It is built for intranet deployments where DNS is unavailable or unreliable — classrooms, offices and field sites — and pairs with Django UDP Discovery Client.

Version
1.0.0
Updated
28 Nov 2025
Available for
Windows, Linux
Languages
Python
Price
Free
License
MIT

>Key features

  • Automatic discovery

    Django servers answer UDP discovery requests as soon as the app loads.

  • Zero configuration

    Works out of the box with sensible defaults; every setting is overridable.

  • Thread-safe

    A background daemon thread that never blocks Django.

  • Production ready

    Thorough error handling, port-conflict recovery and graceful shutdown.

  • Management command

    Start the service on demand, optionally for a fixed duration.

  • Well tested

    Full test coverage with isolated test cases.

>How it works

  1. 01

    Listen

    When Django starts, a background thread listens on UDP port 9999.

  2. 02

    Broadcast

    A client broadcasts the DISCOVER_SERVER message on the local network.

  3. 03

    Respond

    The server validates the message and replies with SERVER_IP:<address>.

  4. 04

    Connect

    The client connects to the address it received — no hardcoded IPs.

>Get started

Requirements

  • Python 3.7+
  • Django 2.2+
  • Windows or Linux (macOS is not supported yet)
Install
pip install django-udp-discovery
Add the app — discovery starts when Django loads
INSTALLED_APPS = [    # ...    "django_udp_discovery",]
Or run it on demand
python manage.py start_discovery --duration 60
Optional settings (defaults shown)
DISCOVERY_PORT = 9999DISCOVERY_MESSAGE = "DISCOVER_SERVER"RESPONSE_PREFIX = "SERVER_IP:"DISCOVERY_TIMEOUT = 0.5

>Changelog

  1. v1.0.0

    • First stable release on PyPI

>Ratings & reviews

—

0 reviews

  • 5 ★0% (0)
  • 4 ★0% (0)
  • 3 ★0% (0)
  • 2 ★0% (0)
  • 1 ★0% (0)
Reviews open when Ogro Projukti accounts launch. Until then, you can rate Django UDP Discovery where you got it.

All reviews