Skip to main content

An MCP Python client for interacting with Orbit chat servers

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Orbit Client

A Python client for interacting with Orbit chat servers. This client provides a command-line interface for chatting with Orbit servers, supporting MCP protocol.

GitHub Project

https://github.com/schmitech/orbit/tree/main/clients/python

Build and Test Before Publishing

Before publishing to PyPI, you should test your package locally. Here's how:

  1. Build the package locally:
# Install build tools if not already installed
pip install build

# Build the package
python -m build
  1. Install the package in development mode:
# Install in editable mode
pip install -e .

# Or install the built wheel directly
pip install dist/schmitech_orbit_client-*.whl
  1. Test the CLI:
# Test basic functionality
orbit-chat --url http://localhost:3000

# Test with debug mode
orbit-chat --url http://localhost:3000 --debug

# Test with API key
orbit-chat --url http://localhost:3000 --api-key your-test-key
  1. Uninstall test version:
pip uninstall schmitech-orbit-client

Publishing Package:

To build the package from source:

# Install build tools
pip install build twine

# Build the package
python -m build

# Upload to PyPI (requires PyPI account)
python -m twine upload dist/*

Removing the Package

To remove the package from PyPI:

# Install twine if not already installed
pip install twine

# Delete specific version
twine delete schmitech-orbit-client==0.1.0

# Or delete all versions
twine delete schmitech-orbit-client

Note: Once a package version is deleted, it cannot be restored. The package name becomes available again after 30 days.

Usage

After installation, you can use the client in two ways:

1. Command-line Interface

The simplest way to use the client is through the command-line interface:

# Basic usage with default settings
orbit-chat --url http://your-server:3000

# Advanced usage with all options
orbit-chat --url http://your-server:3000 \
           --api-key your-api-key \
           --debug \
           --show-timing

Command-line Options

  • --url: Chat server URL (default: http://localhost:3000)
  • --api-key: API key for authentication
  • --debug: Enable debug mode to see request/response details
  • --show-timing: Show latency timing information

Interactive Features

  • Use up/down arrow keys to navigate through chat history
  • Type exit or quit to end the conversation
  • Press Ctrl+C to interrupt the current response
  • Chat history is saved in ~/.orbit_client_history/chat_history

2. Python Module

You can also use the client in your Python code:

from schmitech_orbit_client import stream_chat

# Basic usage
response, timing_info = stream_chat(
    url="http://your-server:3000",
    message="Hello, how are you?"
)

# Advanced usage with all options
response, timing_info = stream_chat(
    url="http://your-server:3000",
    message="Hello, how are you?",
    api_key="your-api-key",  # optional
    debug=True
)

# The response contains:
# - response: The full text response from the server
# - timing_info: Dictionary with timing metrics
#   - total_time: Total request time
#   - time_to_first_token: Time until first response token

Features

  • Interactive CLI: Command-line interface with history navigation
  • Protocol Support: MCP protocol format
  • Real-time Streaming: Responses appear gradually, character by character
  • Colored Output: Better readability with syntax highlighting
  • Debug Mode: Detailed request/response information for troubleshooting
  • Performance Metrics: Latency timing information
  • Authentication: API key support for secure communication
  • Cross-platform: Works on Windows, macOS, and Linux
  • Unicode Support: Full support for non-English characters

Examples

Basic Chat Session

$ orbit-chat --url http://localhost:3000
Welcome to the Orbit Chat Client!
Server URL: http://localhost:3000
Type 'exit' or 'quit' to end the conversation.
You can use arrow keys to navigate, up/down for history.

You: Hello, how are you?
Assistant: I'm doing well, thank you for asking! How can I help you today?

You: exit
Goodbye!

Debug Mode

$ orbit-chat --url http://localhost:3000 --debug
Debug - Request:
{
  "message": "Hello",
  "stream": true
}
Debug - Received:
{
  "text": "Hi there!"
}

License

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

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

schmitech_orbit_client-0.2.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

schmitech_orbit_client-0.2.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file schmitech_orbit_client-0.2.0.tar.gz.

File metadata

  • Download URL: schmitech_orbit_client-0.2.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for schmitech_orbit_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 813303d829fefa68f8cc1107da5e47a272156f14b18b53c9b1f02211ba90d1d6
MD5 be20e842abb6c918e2ef40e75b6dd998
BLAKE2b-256 3a81c6d58357b75c27368610f78a080b6e2d87bc00dce64e1322a5d1c87bf472

See more details on using hashes here.

File details

Details for the file schmitech_orbit_client-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for schmitech_orbit_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4e9866e2683c33454d47830c643d93dc1263a56217edc883279e32ef31b722
MD5 71cf6b5c3756837308264ac4d800d2a0
BLAKE2b-256 8b660d1fbd241b411133d1a920140208a09e3f4f25669f4cdfd2e84c2d59b8ba

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