Skip to main content

Simple file sharing and chat over TCP sockets

Project description

Velora 🚀

A lightweight Python library for peer-to-peer file sharing and real-time chat using TCP sockets. No external dependencies required!

Features ✨

  • 💬 Real-time text chat - Instant messaging over TCP
  • 📁 File sharing - Share any file type up to 1GB
  • 🌐 Multiple connection modes - Local, IP-based, and global (ngrok)
  • 🔧 Zero dependencies - Pure Python using only standard library
  • Quick share mode - One-command file sharing
  • 📦 Easy installation - Install via pip

Installation 📦

pip install velora-chat

Or install from source:

git clone https://github.com/pavansai-tanguturi/Velora.git
cd Velora
pip install -e .

Quick Start 🚀

1. Start a chat server

velora server

2. Join the chat

velora chat

3. Quick share a file

velora share /path/to/file.pdf
velora share /path/to/file.pdf 192.168.1.100        # To specific IP
velora share /path/to/file.pdf 0.tcp.ngrok.io:12345 # To ngrok tunnel

Command Line Usage 💻

Chat Commands

# Start interactive chat client
velora chat

# Connect directly to a server
velora chat --host 192.168.1.100 --port 5003 --name "Your Name"

# Start a server
velora server --host 0.0.0.0 --port 5003

File Sharing Commands

# Share file locally (starts server automatically)
velora share document.pdf

# Share to remote server
velora share document.pdf 192.168.1.100:5003

# Share via ngrok
velora share document.pdf 0.tcp.ngrok.io:12345

Alternative Commands

# Also available as separate commands
velora-chat      # Same as 'velora chat'
velora-share     # Same as 'velora share' 
velora-server    # Same as 'velora server'

Library Usage 📚

Using Velora in your Python code

import velora

# Start a server programmatically
server = velora.VeloraServer(host="0.0.0.0", port=5003)
server.start()

# Connect and send messages programmatically  
client = velora.VeloraClient()
client.connect("127.0.0.1", 5003)
client.send_message("Hello from Python!")

# Quick file sharing
velora.quick_share("/path/to/file.pdf", "192.168.1.100:5003", "YourName")

Connection Modes 🌐

1. Local Mode

Perfect for same-network sharing:

velora chat  # Choose option 1

2. IP-based Mode

Connect across networks using IP addresses:

velora chat --host 192.168.1.100
velora share file.pdf 192.168.1.100

3. Global Mode (ngrok)

Share globally using ngrok tunneling:

# Person A: Start server with ngrok
velora chat  # Choose option 3 -> create

# Person B: Connect to ngrok URL  
velora chat  # Choose option 3 -> join
velora share file.pdf 0.tcp.ngrok.io:12345

Chat Commands 💬

Once in a chat session:

  • hello - Send a text message
  • /file /path/to/file.pdf - Share a file
  • /quit - Exit the chat

File Sharing 📁

  • Supported formats: Any file type
  • Size limit: Up to 1GB per file
  • Auto-download: Files saved to ~/Downloads
  • Duplicate handling: Automatic renaming (file.pdf, file (1).pdf, etc.)

Network Requirements 🔧

Local Network

  • Port 5003 open (or custom port)
  • All devices on same network

Remote Network

  • Server host needs public IP or port forwarding
  • Firewall rules allowing TCP traffic on chosen port

Global Access

  • Install ngrok for easy tunneling
  • Or use VPS/cloud server with public IP

Examples 📋

Example 1: Local File Sharing

# Terminal 1: Start server
velora server

# Terminal 2: Share a file
velora share vacation_photos.zip

Example 2: Remote File Sharing

# Computer A (192.168.1.5): Start server  
velora server

# Computer B: Share file to A
velora share presentation.pptx 192.168.1.5

Example 3: Global Chat with ngrok

# Person A: Create global tunnel
velora chat  # Choose option 3 -> create -> get ngrok URL

# Person B: Join via ngrok URL
velora chat  # Choose option 3 -> join -> enter ngrok URL

Development 🛠️

Setup development environment

git clone https://github.com/pavansai-tanguturi/Velora.git
cd Velora
pip install -e ".[dev]"

Run tests

pytest tests/

Code formatting

black velora/
flake8 velora/

Contributing 🤝

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Security Notice ⚠️

This is designed for trusted networks and personal use. For production environments, consider adding:

  • Authentication mechanisms
  • End-to-end encryption
  • Input validation and sanitization
  • Rate limiting and abuse protection

Support 💡


Made with ❤️ by Pavan Sai Tanguturi

Project details


Download files

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

Source Distribution

velora_chat-1.0.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velora_chat-1.0.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file velora_chat-1.0.1.tar.gz.

File metadata

  • Download URL: velora_chat-1.0.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for velora_chat-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2242810414ba5ef0190d0fb22eea1a57fab0d726a793d857ad9050927536ce65
MD5 e3fae2f58df6b12e87b6e14191e64790
BLAKE2b-256 db5792a121ef632d0ddafa5d4f841e27a28c1721128767454f243cf45ef5b859

See more details on using hashes here.

File details

Details for the file velora_chat-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: velora_chat-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for velora_chat-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1322b8de81f378fb07719dae4d6ce6bfd96f5738d6130b89ad5b86d130f7f72
MD5 ec52442d5775f2f0aeeb30a3448345fb
BLAKE2b-256 34b8edc5bbc03e021bd00007e5cbb027b767c62795ce763c7c85890149d32914

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page