Metadata-Version: 2.1
Name: pubsubx
Version: 0.1.0
Summary: A publish-subscribe messaging system
Home-page: https://github.com/yourusername/simplepubsub
Author: xxparthparekhxx
Author-email: xx.parthparekh.xx@gmail.com
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# SimplePubSub

SimplePubSub is a lightweight publish-subscribe messaging system implemented in Python. It provides a simple server and client for building distributed messaging applications.

## Installation

You can install SimplePubSub using pip:

```
pip install simplepubsub
```

## Usage

### Starting the server

To start the SimplePubSub server:

```python
from simplepubsub import PubSubServer

server = PubSubServer()
server.start()
```

### Using the client

Here's a simple example of how to use the SimplePubSub client:

```python
from simplepubsub import PubSubClient
import time

def on_message(topic, message):
    print(f"Received message on topic '{topic}': {message}")

# Create and connect the client
client = PubSubClient()
client.connect()

# Set up the message callback
client.on_message(on_message)

# Subscribe to a topic
client.subscribe("test_topic")

# Publish a message
client.publish("test_topic", "Hello, SimplePubSub!")

# Keep the script running
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    print("Disconnecting...")
    client.disconnect()
```

## License

This project is licensed under the MIT License.
