A minimal Hy utility library, using mostly the standard libraries.
Project description
🦑 Hyjinx
Functions and macros useful for modern living in the Hy REPL.
Compatible with Hy 0.29.0.
Hylights
- A Hy code beautifier and in-REPL syntax highlighting
- An
inspect
module that works like Python's, but also for Hy code - Pretty tracebacks with correct syntax highlighting for hy or python
- Print/get/edit source code of a function, module etc.
- In-repl code analysis and discussion using LLMs (e.g. for writing docstrings)
- A sensible
defmethod
- Numpy array pretty printing
- A zmq lazy pirate protocol
- A minimal ncurses class
Modules
-
hyjinx.lib: a smorgasbord of convenience functions.
-
hyjinx.source: live code inspection.
-
hyjinx.inspect: code inspection.
-
hyjinx.doc: peruse hy documentation.
-
hyjinx.screen: a convenient ncurses wrapper.
-
hyjinx.mat: numpy pretty-printing for humans. (requires numpy, jax optional)
-
hyjinx.[zmq_client, zmq_server, crypto, wire]: lazy-pirate zmq RPC architecture. (requires zmq, ecdsa, zstandard)
-
hyjinx.llm: discuss code with a Large Language Model (AI). TabbyAPI, OpenAI-compatible and Claude are supported. (requires
openai
andanthropic
packages.)
Install
$ pip install -U hyjinx
or, with optional dependencies,
$ pip install -U hyjinx[zmq]
$ pip install -U hyjinx[llm]
To install offline hy/hyrule documentation,
$ hy -m hyjinx.docs
For syntax highlighting in the REPL, put
(import hyjinx.source [hylight]) (setv repl-output-fn hylight)
in your .hyrc.
See hyjinx.hyrc for example usage.
Optional dependencies
You can install with the [zmq]
option which also installs ecdsa, pyzmq and zstandard for the zmq server/client
You can install with the [llm]
option which also installs openai and lets you discuss code objects with ChatGPT or a locally-served LLM (via TabbyAPI or similar).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hyjinx-0.29.5.tar.gz
.
File metadata
- Download URL: hyjinx-0.29.5.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fdc1f534f2adc4960c4985f43d6174bb383c315bd2945c494802bd82eef2134 |
|
MD5 | f66259488d3cff956f369b6a894604c9 |
|
BLAKE2b-256 | 5a4d0955ea9369e78fae33a9a82554dffa1c10ce2ed3c679f91d2070f990e634 |
File details
Details for the file hyjinx-0.29.5-py3-none-any.whl
.
File metadata
- Download URL: hyjinx-0.29.5-py3-none-any.whl
- Upload date:
- Size: 41.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39d9f237398f2eb093694097594192b4e51ee784bbf2ecfcef3a20c2eb9d56c5 |
|
MD5 | 227842c3fff95d25cec249a5e52365f5 |
|
BLAKE2b-256 | 120591795d4756a6a60bc5a01d3e1292e2d5777e114749bae01718caeb381109 |