Need help with export?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

fazibear
142 Stars 15 Forks MIT License 43 Commits 3 Opened issues

Description

Erlport wrapper for Elixir

Services available

!
?

Need anything else?

Contributors list

# 81,320
Elixir
opal
8-bit
js
31 commits
# 64,426
TypeScr...
CSS
state-m...
sweetal...
3 commits
# 200,688
kafka
sasl
Django
HTML
1 commit
# 739,748
Elixir
Python
Ruby
1 commit
# 453,334
C++
Objecti...
dynamod...
Shell
1 commit
# 739,749
Elixir
Python
Ruby
1 commit

Export Package Version Build Status

Erlport wrapper for Elixir.

Installation

Add export to your list of dependencies in

mix.exs
:
def application do
  [applications: [:export]]
end

def deps do [ {:export, "~> 0.1.0"}, ] end

Usage

Ruby

defmodule SomeRubyCall do
  use Export.Ruby

def call_ruby_method do # path to ruby files {:ok, ruby} = Ruby.start(ruby_lib: Path.expand("lib/ruby"))

# call "upcase" method from "test" file with "hello" argument
ruby |> Ruby.call("test", "upcase", ["hello"])

# same as above but prettier
ruby |> Ruby.call(upcase("hello"), from_file: "test")

end end

Python

defmodule SomePythonCall do
  use Export.Python

def call_python_method do # path to our python files {:ok, py} = Python.start(python_path: Path.expand("lib/python"))

# call "upcase" method from "test" file with "hello" argument
py |> Python.call("test", "upcase", ["hello"])

# same as above but prettier
val = py |> Python.call(upcase("hello"), from_file: "test")

# close the Python process
py |> Python.close()

val

end end

Thank you!

Become Patreon

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.