RustySnek

RustySnek

Venomous - Erlport wrapper for managing concurrent python processes with ease

:snake: :test_tube: 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 :boom: :EXIT signal appears, the Python process dies without further execution by killing :axe: 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 :smiling_face:

https://hexdocs.pm/venomous/Venomous.html

Most Liked

kip

kip

ex_cldr Core Team

Congrats on your first Elixir library. I like the delicious irony too that pythons aren’t venomous :slight_smile:

RustySnek

RustySnek

I’ve released 0.5.1 version of Venomous :test_tube: :snake: which adds optional :fire: 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

RustySnek

They must have drank some kind of toxic MIXture :wink:

jackalcooper

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 :heartpulse:

RustySnek

RustySnek

I’ve released 0.4.0 version of Venomous :test_tube: :snake:

  • 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

Where Next?

Popular in Libraries Top

zoltanszogyenyi
Hey everyone :wave: Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-source U...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
cjen07
parameterized pipe in elixir: |n> edit: negative index in |n> and mixed usage with |> are supported example: use ParamP...
New
dbern
I’m excited to announce that TaxJar has developed and open-sourced DateTimeParser. We developed it because we found a need to parse user ...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 18262 141
New
ericlathrop
I built a silly site for Halloween that uses Phoenix Channels on the backend, and React on the frontend. I had many problems integrating ...
New
Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New

Other popular topics Top

JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

Sub Categories:

We're in Beta

About us Mission Statement