This project has been archived by its maintainers, and is no longer receiving any updates.
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:
- Build the package locally:
# Install build tools if not already installed
pip install build
# Build the package
python -m build
- 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
- 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
# Test with custom session ID
orbit-chat --url http://localhost:3000 --session-id my_custom_session_123
- 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 \
--session-id your-session-id \
--debug \
--show-timing
Command-line Options
--url: Chat server URL (default: http://localhost:3000)--api-key: API key for authentication--session-id: Session ID for tracking the conversation (default: auto-generated UUID)--debug: Enable debug mode to see request/response details--show-timing: Show latency timing information
Session ID Examples
# Using auto-generated UUID (default)
orbit-chat --url http://localhost:3000
# Using a custom session ID
orbit-chat --url http://localhost:3000 --session-id user_123_session_456
# Using a UUID format session ID
orbit-chat --url http://localhost:3000 --session-id 123e4567-e89b-12d3-a456-426614174000
Interactive Features
- Use up/down arrow keys to navigate through chat history
- Type
exitorquitto 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
session_id="your-session-id", # 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
- Session Tracking: Session ID support for conversation tracking
- 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
Session ID: 123e4567-e89b-12d3-a456-426614174000
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.
Metadata
Release files for schmitech-orbit-client 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| schmitech_orbit_client-1.1.6.tar.gz | 16.9 kB | Without provenance | Details for schmitech_orbit_client-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| schmitech_orbit_client-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for schmitech_orbit_client-1.1.6-py3-none-any.whl |
Total release size: 35.0 kB
Release files / schmitech_orbit_client-1.1.6.tar.gz
| Download URL | schmitech_orbit_client-1.1.6.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2d7342db15fa6fa5f0c2b392534a3a474852b28b4d03c86c6361516329e74ca
|
|
BLAKE2b-256 checksum How to use checksums |
0e421c8d9ef9aa6b6c7e164fa3b065a07828070529bd5a1335e34e0bd66c2d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / schmitech_orbit_client-1.1.6-py3-none-any.whl
| Download URL | schmitech_orbit_client-1.1.6-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4adb175efb9c90a4adae2d62d81f60700f6783e6834a18726939d9b75440bd10
|
|
BLAKE2b-256 checksum How to use checksums |
0bb963fead2adbadc3fa41fa9e69d7170b855af273202e212e49f2bb45f7058d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for schmitech-orbit-client 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.