SoS Notebook extension for Lua
Project description
sos-lua
SoS Notebook extension for the Lua programming language.
Installation
pip install sos-lua
You will also need a Lua Jupyter kernel installed. This module supports:
- ILua (
pip install ilua) - kernel namelua - xeus-lua (
conda install -c conda-forge xeus-lua) - kernel namexlua
Data Exchange
This module supports exchanging the following data types between SoS (Python) and Lua:
| Python | Lua |
|---|---|
None |
nil |
bool |
boolean |
int, float |
number |
str |
string |
list, tuple |
sequential table {1, 2, 3} |
dict |
keyed table {a=1, b=2} |
set |
sequential table |
numpy.ndarray |
nested table |
pandas.DataFrame |
table of column tables |
Nested structures (tables within tables) are supported in both directions.
Usage
In a SoS notebook, use Lua cells and exchange variables with %get and %put:
# In a SoS cell
data = [1, 2, 3]
# In a Lua cell
%get data
print(data[1]) -- prints 1
# Transfer back
result = {sum = 6, count = 3}
%put result
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sos_lua-0.1.0.tar.gz.
File metadata
- Download URL: sos_lua-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5827b01b61c2682aa62c25b65449bf56c77f1ad35b2567694b3792c16127b456
|
|
| MD5 |
b55906ef475dc9b74724f36a578517c8
|
|
| BLAKE2b-256 |
3a12172983a7ad405ea8aa95a16c851c9097ff11603a627c392d2dbb95e0e3e9
|
File details
Details for the file sos_lua-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sos_lua-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
568f1558030eebead86faa731138c85b44e022e9daac5379b9d86ce1423f2a99
|
|
| MD5 |
8f3affa303c1e4c02856b8d03ee0e696
|
|
| BLAKE2b-256 |
8ea3a8d9f7eb2c2e20c31dec5999eb3df2856d575092045812b0c12a68be923e
|