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 ![]()
First Post!
RustySnek
I’ve released 0.3.0 version of Venomous ![]()
- fixed many major issues with how python processes were handled which caused zombie processes and weird behaviour.
- multiple tasks ran on a single
SnakeWorkerwill now stack instead of timing out - add option keywords
Changelog: Release v0.3.0 · RustySnek/Venomous · GitHub
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
Last Post!
RustySnek
It wasn’t really well thought out as if you just supply the function with -1 it will keep on spawning workers until it encounters the error which in this case will be the :max_children. It’s kind of a way of signaling that you have reached the limit. I might change it later on to make a little bit more sense as it’s not really an error if everything did work as intended.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









