-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
123 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,30 @@ | ||
# Lucipy: The simple LUCIDAC python client | ||
|
||
Installation: `pip install lucipy` or just clone the repository (which is just online | ||
at https://github.com/anabrid/lucipy) and import the `lucipy` directory. | ||
This is a code to get started with the [LUCIDAC](https://anabrid.com/luci) | ||
analog-digital hybrid computer. With this library, users can program the | ||
network-enabled analog computer straight from the Python programming language. | ||
|
||
This is a minimal python client, making simple things simple. That means things | ||
like device managament is capable of the python REPL without headache: | ||
It is a minimal python code with near-to-no dependencies. It works very | ||
well interactively in IPython and Jupyter Notebooks and within your favourite | ||
scientific python environment on any platform (Mac/Windows/Linux). | ||
|
||
``` | ||
shell> python | ||
> from simplehc import HybridController | ||
> hc = HybridController("192.168.68.60", 5732) | ||
INFO:simplehc:Connecting to TCP 192.168.68.60:5732... | ||
> hc.query("status") | ||
{'dist': {'OEM': 'anabrid', | ||
'OEM_MODEL_NAME': 'LUCIDAC', | ||
'OEM_HARDWARE_REVISION': 'LUCIDAC-v1.2.3', | ||
'BUILD_SYSTEM_NAME': 'pio', | ||
'BUILD_SYSTEM_BOARD': 'teensy41', | ||
'BUILD_SYSTEM_BOARD_MCU': 'imxrt1062', | ||
'BUILD_SYSTEM_BOARD_F_CPU': '600000000', | ||
'BUILD_SYSTEM_BUILD_TYPE': 'release', | ||
'BUILD_SYSTEM_UPLOAD_PROTOCOL': 'teensy-cli', | ||
'BUILD_FLAGS': '-DANABRID_DEBUG_INIT -DANABRID_UNSAFE_INTERNET -DANABRID_ENABLE_GLOBAL_PLUGIN_LOADER', | ||
'DEVICE_SERIAL_NUMBER': '123', | ||
'SENSITIVE_FIELDS': 'DEVICE_SERIAL_UUID DEVICE_SERIAL_REGISTRATION_LINK DEFAULT_ADMIN_PASSWORD', | ||
'FIRMWARE_VERSION': '0.0.0+g0d3e361', | ||
'FIRMWARE_DATE': 'unavailable', | ||
'PROTOCOL_VERSION': '0.0.1', | ||
'PROTOCOL_DATE': 'unavailable'}, | ||
'flashimage': {'size': 316416, | ||
'sha256sum': 'cd2f35648aba6a95dc1b32f88a0e3bf36346a5dc1977acbe6edbd2cdf42432d3'}, | ||
'auth': {'enabled': False, 'users': []}, | ||
'ethernet': {'interfaceStatus': True, | ||
'mac': '04-E9-E5-0D-CB-93', | ||
'ip': {'local': [192, 168, 68, 60], | ||
'broadcast': [192, 168, 68, 255], | ||
'gateway': [192, 168, 68, 1]}, | ||
'dhcp': {'active': True, 'enabled': True}, | ||
'link': {'state': True, | ||
'speed': 100, | ||
'isCrossover': True, | ||
'isFullDuplex': True}}} | ||
> | ||
``` | ||
This is [open source code released under MIT/GPL](LICENSE.md) at | ||
https://github.com/anabrid/lucipy and published to the Python Package Index | ||
at https://pypi.org/project/lucipy/. | ||
|
||
The code was formerly known as "Synchronous Hybrid Controller Python Client for REDAC/LUCIDAC" | ||
(shcpy). It differs from the [pybrid-computing](https://pypi.org/project/pybrid-computing/) | ||
code as it is much simpler: | ||
## Installlation | ||
|
||
* near to no dependencies | ||
* no async | ||
* no typing | ||
* not a framework | ||
Assuming you have a working Python installation: | ||
|
||
In contrast, lucipy ships | ||
``` | ||
pip install lucipy | ||
``` | ||
|
||
* a simple usable hybrid controller class | ||
* a bit of syntactic sugar for route-based analog circuit programming | ||
* Routines for device autodiscovery with zeroconf and USB Serial detection | ||
Or just clone the repository (which is just online | ||
at https://github.com/anabrid/lucipy) and import the `lucipy` directory. | ||
|
||
This makes lucipy ideally suited to be used interactively in IPython and Jupyter Notebooks. | ||
## Documentation | ||
|
||
Lucipy is 20 times smaller then pybrid (4 files instead of 80, | ||
800SLOC instead of 16,000). | ||
For further information see the code documentation including usage examples | ||
and API reference at **https://anabrid.github.io/lucipy/**. | ||
|
||
The repo also contains an Over-The-Air demo updater client. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters