Metadata-Version: 2.4
Name: chatterflow
Version: 0.0.4
Summary: A cli based chat application in python
Author: Ishan Bhat
Author-email: ishan2003bhat@gmail.com
Keywords: A cli based chat application in python
Classifier: Development Status :: 4 - Beta
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
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Artistic Software
Classifier: Topic :: Text Processing
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: asciigenator
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Provides-Extra: all
Requires-Dist: build; extra == "all"
Requires-Dist: pre-commit; extra == "all"
Requires-Dist: ruff; extra == "all"
Requires-Dist: twine; extra == "all"
Requires-Dist: pytest; extra == "all"
Requires-Dist: pytest-cov; extra == "all"
Requires-Dist: sphinx; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# chatterflow

![Python Version](https://img.shields.io/badge/python-3.11-blue.svg)
[![License](https://img.shields.io/github/license/bhatishan2003/chatterflow)](LICENSE)
[![Python CI](https://github.com/bhatishan2003/chatterflow/actions/workflows/python-app.yml/badge.svg)](https://github.com/bhatishan2003/chatterflow/actions/workflows/python-app.yml)
[![Build and Deploy Sphinx Docs](https://github.com/bhatishan2003/chatterflow/actions/workflows/sphinx.yml/badge.svg)](https://github.com/bhatishan2003/chatterflow/actions/workflows/sphinx.yml)

A simple, terminal-based chat application with user authentication and private messaging, built with Python sockets.

## Features

- **User Authentication:** Secure registration and login system.
- **Password Hashing:** Passwords are securely hashed using PBKDF2.
- **Public Chat:** Broadcast messages to all connected users.
- **Private Messaging:** Send private messages to specific users.
- **User List:** View a list of all online users.
- **Multi-client Support:** The server uses threading to handle multiple clients concurrently.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

- Python 3.11 or higher

### Installation

1.  **Clone the repository:**

    ```bash
    git clone https://github.com/bhatishan2003/chatterflow.git
    cd chatterflow
    ```

2.  **Create and activate a virtual environment (recommended):**

    - **Windows:**

      ```bash
      python -m venv .venv
      .venv\Scripts\activate
      ```

    - **macOS & Linux:**
      ```bash
      python -m venv .venv
      source .venv/bin/activate
      ```

3.  **Install the package:**

    - For regular use:

      ```bash
      pip install .
      ```

    - For development (editable mode):
      ```bash
      pip install -e .
      ```

## Usage

### 1. Start the Server

Open a terminal and run the following command to start the chat server on the default host (`127.0.0.1`) and port (`9009`):

```bash
chatterflow --server
```

### 2. Start the Client

Open one or more new terminals and run the following command to connect a client to the server:

```bash
chatterflow --client
```

## Commands

The client supports the following commands:

| Command                 | Description                 |
| ----------------------- | --------------------------- |
| `/msg <user> <message>` | Send a private message.     |
| `/list`                 | List all online users.      |
| `/help`                 | Show this help message.     |
| `/quit`                 | Disconnect from the server. |

## Testing

To run the test suite, execute the following command:

```bash
pytest -v
```

## Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
