Skip to main content

Simple Secure and Lightweight Python Service Discovery

Project description

PyDiscover: Simple Secure and Lightweight Python Service Discovery

Python version:Python 3.4 and above
Author:Daniel Garcia (cr0hn) - @ggdaniel

What’s PyDiscover

PyDiscover is a simple service discovery client and server, designed with simplicity, performance and security in mind. Instead of implement SSDP protocol or any else, use a very simple mechanism: send to the clients information as a JSON format.

PyDiscover is very flexible and lightweight, and incorporates a cypher mechanism to secure (password based) the communication between server and clients.


  • Simple usage.
  • Configurable multicast service discovery.
  • Password protected access to server info (optional).
  • AES encryption (if you defines a password).
  • Custom channel definition.
  • High server performance, based in the new Python asyncio module.
  • Server can spread any information to clients. This information are sent/received as a JSON format.
  • Simple configuration file


Install is so easy:

# python3.4 -m pip install pydiscover

How it works?


PyDiscover is composed by client and server:

  • Server listen for multicast clients request in the port 50000 (by default).
  • Clients send requests using a multicast address to the port 50000.

Virtual Channels (or magic):

Client and server must transmit information in the same virtual channel (or magic). The magic is a pre-shared word that server/client known. Only messages with this word will be attended, performing the “virtual channel”.

Hidden mode:

By default (per security reasons) server runs as hidden mode. This is: if server receives a messages without the correct magic or with wrong password, doesn’t answer nothing to the client request. If we want that server answer with error message, we’ll activate explicitly.

Securing communication

We can set a password for the server. When it’s set, the information will be sent cyphered using AES to the clients. Only in the clients known the password could be understand the messages.

Sent/received information

Server must be started with -d param. This param referees to a .cfg file. This file must have the format:

services =
net_password = asfi0j9ask123
  • A [DEFAULT] section.
  • Any information as: key = value.

The DEFAULT section content will be sent as a JSON format to the clients.



Starting server in port 40000, with a password an the virtual channel is build by word: “askskAls828”:

# pydiscover-server -p 40000 --password 1238d8KKls_jj -m askskAls828 -d example.cfg

Disablind hidden mode:

# pydiscover-server -p 40000 --password 1238d8KKls_jj -m askskAls828 -d example.cfg --disable-hidden

You can see more examples typing:

# pydiscover-server -h


Connecting to the server with the above configuration:

# pydiscover-client -p 40000 --password 1238d8KKls_jj -m askskAls828 -v

Real example

What’s new?

Version 1.0.0

  • First version released


PyDiscover is released under BSD licence.

Project details

Release history Release notifications

This version
History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pydiscover-1.0.1.tar.gz (7.4 kB) Copy SHA256 hash SHA256 Source None May 2, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page