{"id":13779510,"url":"https://github.com/marianoguerra/pynerl","last_synced_at":"2025-04-14T01:50:34.526Z","repository":{"id":66955608,"uuid":"674139","full_name":"marianoguerra/pynerl","owner":"marianoguerra","description":"run an embeded python interpreter in erlang","archived":false,"fork":false,"pushed_at":"2012-08-09T07:52:06.000Z","size":105,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T09:02:27.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marianoguerra.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-18T23:38:49.000Z","updated_at":"2024-01-04T16:46:57.000Z","dependencies_parsed_at":"2023-02-20T15:13:05.368Z","dependency_job_id":null,"html_url":"https://github.com/marianoguerra/pynerl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianoguerra%2Fpynerl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianoguerra%2Fpynerl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianoguerra%2Fpynerl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianoguerra%2Fpynerl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marianoguerra","download_url":"https://codeload.github.com/marianoguerra/pynerl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809024,"owners_count":21164895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T18:01:06.015Z","updated_at":"2025-04-14T01:50:34.499Z","avatar_url":"https://github.com/marianoguerra.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"pynerl\n======\n\n\nstatus\n------\n\nI would really like to finish this, but for now it's on hold, if you would like to help, fork it and send pull requests.\n\nabout\n-----\n\npynerl is a set of NIFs that allow to run python code from erlang\n\nthe NIFs embed python and allow to run eval and call functions.\n\npynerl does the transformation of data types.\n\nan example session::\n\n        1\u003e pynerl:eval(\"t = 1\", \"t\").\n        1\n        2\u003e pynerl:eval(\"t = 1 * 2\", \"t\").\n        2\n        3\u003e pynerl:eval(\"import time;t = time.time()\", \"t\").            \n        1274236802.877999\n        4\u003e pynerl:eval(\"import random;t = random.random()\", \"t\").         \n        0.45102117275294684\n        5\u003e pynerl:eval(\"t = print('hello erlang or python')\", \"t\").                                 \n        hello erlang or python\n                              none\n        6\u003e pynerl:call(\"time\", \"time\", []).                        \n        1274236859.510859\n        7\u003e pynerl:call(\"random\", \"random\", []).\n        0.9623136682858975\n        8\u003e pynerl:eval(\"t = True\", \"t\").                           \n        true\n        9\u003e pynerl:eval(\"t = 2.3\", \"t\"). \n        2.3\n\nInformation\n-----------\n\nThis is just an experiment, some of the code may be usable for other things but\nas the documentation on NIFs says::\n\n        Avoid doing lengthy work in NIF calls as that may degrade the\n        responsiveness of the VM. NIFs are called directly by the same\n        scheduler thread that executed the calling Erlang code. The calling\n        scheduler will thus be blocked from doing any other work until the NIF\n        returns.\n\nThat means that you shouldn't run a really long python method with it since it would\nblock the scheduler.\n\nI may try to make something similar to `erlectricity`__\n\nor erlv8_\n\n__ http://github.com/mojombo/erlectricity/\n\n.. _erlv8: https://github.com/beamjs/erlv8/wiki/Using-erlv8\n\nbuilding\n--------\n\nyou will need a compiler, erlang dev files and python dev files, in debian\nbased systems you get them with::\n\n    sudo apt-get install python3-dev erlang-dev build-essential\n\nafter that you may have to check that the paths in build.sh are the corrects\nfor you, specially this two:\n\n* /usr/lib/erlang/erts-5.8.5/include/\n* /usr/include/python3.2/ \n\nif you have another version of erlang or python just change them on build.sh\n\nif it gives some linker error check the *-lpython3.2mu* and change it to fit\n(maybe -lpython3.2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarianoguerra%2Fpynerl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarianoguerra%2Fpynerl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarianoguerra%2Fpynerl/lists"}