Docs & Support

🤔 Why DFP

DFP protocol is actually built for education purpose and to fullfill simple needs . Why do i built it - Actually i just built it for fun and i though building it will help me through my understanding of what/how protocol and network works ⚙️.

But then i thought of making some custom rules for it and here it is my initial version my very basic yet functional custom protocol 🛠️.


📦 Installation

i. Install via Pypi (pip)

pip install dfp-protocol

ii. Install via GitHub

git clone https://github.com/RunProgrammer/DFP-Data-Flag-Protocol.git
cd DFP-Data-Flag-Protocol
pip install -r requirements.txt


⚙️ Setup

Initializing the DFP Server

python server.py  (or)
python server.py --host 0.0.0.0 --port 8080

Connecting to via Client

from dfp import DFPClient
client = DFPClient()
client.connect()
print(client.send("PING", "Hello"))


🚨 Alteration

The flags can be altered depending on the usage , which improves flexibility

The flags can be altered in flags.py file


data_event = {"sensor_id": "temp1", "value": 95}
flag = dfp.flag(data_event)

Use the CLI for testing or integration:

dfp --rules flags.yaml --event sensor_event.json


🚩 Flags

Default Flags

"PING"
"DISCONNECT"
"SEND"
"RECEIVE"
"LOGIN"
"REGISTER"

*More Flags will be added soon....