RustySnek
Venomous - Erlport wrapper for managing concurrent python processes with ease
Venomous aims to simplify the concurrent use of erlport Python Ports, focusing on dynamic extensibility such as spawning, reusing, and terminating processes on demand. It also handles unused processes, by killing them once they pass their configured inactive TTL. Venomous core functions ensure that whenever
:EXIT signal appears, the Python process dies without further execution by killing
its OS process (brutally).
This is my first attempt at creating an Elixir library. The idea stemmed from the challenge of properly exiting Python processes. Even after closing the Python port, execution would persist until the end of a function or iteration. My goal is to handle these exits effectively while also enabling process reuse, thus avoiding the constant spawning and stopping of new ones.
Any feedback would be greatly appreciated ![]()
Most Liked
kip
Congrats on your first Elixir library. I like the delicious irony too that pythons aren’t venomous ![]()
RustySnek
I’ve released 0.5.1 version of Venomous
which adds optional
Hot reloading for python modules.
To enable the hot reloading:
- Install python watchdog dependancy using
mix venomous.watchdog install - Enable serpent_watcher in your dev config:
config :venomous, :serpent_watcher, enable: true - Add your module paths in snake_manager config:
config :venomous, :snake_manager, %{ python_opts: [ module_paths: ["my_python_modules/", ...] ] }
Now all modules inside the configured module_paths should reload on edit.
RustySnek
They must have drank some kind of toxic MIXture ![]()
jackalcooper
thanks so much! I am using NimblePool to wrap python process running models. Your implementation to manage python process is way more sophisticated than mine so I guess I’m going to use it ![]()
RustySnek
I’ve released 0.4.0 version of Venomous
![]()
- Included support for erlport python options. ex. module_paths, python_executable, packet_bytes…
- Add named processes, separate from the regular SnakeManager ones
- Fixed issue with lib breaking whenever python process was killed on exception…
- Quicker exits whenver processes are spammed
- Include examples in docs
Changelog: Release v0.4.0 · RustySnek/Venomous · GitHub







