Skip to main content

OpenPylot — A Rust-powered personal AI assistant (Python bindings)

Project description

OpenPylot — Python Bindings

Python bindings for OpenPylot, a Rust-powered personal AI assistant.

Installation

pip install openpylot

Note: The Rust binary must also be installed. The Python package wraps the native binary via PyO3 and also provides a CLI shim.

Quick Start

Interactive Setup

from pylot import PylotAgent

PylotAgent.init()  # Launches the terminal wizard

Chat

from pylot import PylotAgent

agent = PylotAgent.from_config("~/.pylot/secrets.enc")
response = agent.chat("What meetings do I have today?")
print(response)

Programmatic / CI Setup

from pylot import PylotAgent, Config

config = Config(
    llm_provider="openai",
    llm_model="gpt-4o",
    openai_api_key="sk-...",
    telegram_bot_token="...",
)
agent = PylotAgent(config)
response = agent.chat("Schedule a meeting with John tomorrow at 3pm")

Custom Tools

def search_web(query: str) -> str:
    # your implementation
    return "results..."

agent.register_tool(
    name="search_web",
    schema='{"type":"object","properties":{"query":{"type":"string"}}}',
    callback=search_web,
)

CLI

Once installed, pylot is available on your PATH:

pylot init          # Interactive setup
pylot chat "Hi"     # One-shot chat
pylot serve         # Background daemon
pylot doctor        # Diagnostics

Development

# Install maturin
pip install maturin

# Build and install in development mode
cd python
maturin develop

# Run tests
pip install -e ".[dev]"
pytest

License

MIT

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

openpylot-0.1.0.tar.gz (592.7 kB view details)

Uploaded Source

Built Distributions

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

openpylot-0.1.0-cp39-abi3-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.9+Windows x86-64

openpylot-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

openpylot-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

openpylot-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

openpylot-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file openpylot-0.1.0.tar.gz.

File metadata

  • Download URL: openpylot-0.1.0.tar.gz
  • Upload date:
  • Size: 592.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for openpylot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e35ad50e78de838435cde75592f7807920e3ccb0f23edc7ffd1668a9c2eab646
MD5 7b5c0168cc3e0e04f27bc1e2d2df08e8
BLAKE2b-256 b4caa4aac418ae3dde061562ec5f5b7b6f6859cb1ab64c53414d3e71107e98c0

See more details on using hashes here.

File details

Details for the file openpylot-0.1.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: openpylot-0.1.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for openpylot-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b6322f7ef973d8c4b88dd6d58e142d0799ae93114b8a378645f14009637831cd
MD5 7fe90a5c463900e1dd8f462067a68531
BLAKE2b-256 1317deffa3ddd308052e8d878db34738213c7c99977ad303e83e86eb06553790

See more details on using hashes here.

File details

Details for the file openpylot-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for openpylot-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 daf68c10381385a528cbe28b201aeba93152dade0d5b5bf9d7338e25fcd0e73b
MD5 32e79eaa67cf3dd9dfdd504afa5e91b2
BLAKE2b-256 62bd5e6439aca206746876d9f1913cd7f77831d934c313e54eb02ca1f219f99e

See more details on using hashes here.

File details

Details for the file openpylot-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for openpylot-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a2a3dc156375f66bf61afe413e3a47ac22126fc253245e767782c143af201e91
MD5 a5c3613f07ccc41f0459cde68cdb058a
BLAKE2b-256 9374406ed3eee15cd3d9da95196f42513200b43a700d011bc159ee0afd5c5cad

See more details on using hashes here.

File details

Details for the file openpylot-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openpylot-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0782061251372f5d87be9098c7fa38651d9e52736cbca27eff02b9b4006d973a
MD5 1581d58b9a2b15aa6feb5e27de2876fe
BLAKE2b-256 de3a555a4761c5293839957dcaa9fa3cd7bb0f9b1f7759f32bdd8f5992ec6317

See more details on using hashes here.

File details

Details for the file openpylot-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for openpylot-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d66e4540dffebb882baac96880a8d418a0f80083dd62bdb27bb1660560c79c51
MD5 807e8adf4f0dab658831e0eebdae0486
BLAKE2b-256 f43355b2561e10255cced429708d5f56b8cbabbf3082f70076ba1e99061f6978

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