{"id":13453439,"url":"https://github.com/GoEvaCom/eosjs_python","last_synced_at":"2025-03-24T01:31:27.819Z","repository":{"id":32946771,"uuid":"136063022","full_name":"GoEvaCom/eosjs_python","owner":"GoEvaCom","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-11T19:03:18.000Z","size":2408,"stargazers_count":43,"open_issues_count":8,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-10T17:19:25.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://eva.coop/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoEvaCom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-04T17:55:01.000Z","updated_at":"2023-11-18T11:24:50.000Z","dependencies_parsed_at":"2022-08-07T18:30:26.732Z","dependency_job_id":null,"html_url":"https://github.com/GoEvaCom/eosjs_python","commit_stats":null,"previous_names":["evacoop/eosjs_python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Feosjs_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Feosjs_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Feosjs_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoEvaCom%2Feosjs_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoEvaCom","download_url":"https://codeload.github.com/GoEvaCom/eosjs_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245194230,"owners_count":20575725,"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-07-31T08:00:40.041Z","updated_at":"2025-03-24T01:31:27.446Z","avatar_url":"https://github.com/GoEvaCom.png","language":"Python","readme":"# EOSJS PYTHON\n\neosjs python is a eosjs wrapper to communicate with the eos blockchain in python. It works by wrapping the nodejs library eosjs into a Python package.\n\n## Authors\n* [@raphaelgodro](https://github.com/raphaelgodro)\n\n## License\nThis project is licensed under the MIT License.\n\n## Installation\n\nFirst, install nodejs if its not on your system already:\n```\napt-get update\napt-get -y install curl\ncurl -sL https://deb.nodesource.com/setup_10.x | bash\napt-get -y install nodejs\n```\n\nThen install from Pypi packages:\n```\npip3 install eosjs_python\n```\n\nOr from source`(if you want to contribute)` : \n```\ngit clone https://github.com/EvaCoop/eosjs_python\ncd eosjs_python\npython3 setup.py develop\n```\n\nYou also need eosjs as a node dependency.\nYou could install it globally\n```\nnpm install -g eosjs\n```\nOr can also install it in the js subdirectory within this package\n```\ncd js \u0026\u0026 npm install\n```\n\nIn order for the repo to work, one really need to install the js dependencies.\n\n## Examples using the library\n\n### Generate ECC keys\n```python\nfrom eosjs_python import Eos\n\nkey_pair = Eos.generate_key_pair()\nprint(key_pair)\n```\n\n### Create EOS account\n```python\nfrom eosjs_python import Eos\n\neos = Eos({\n\t'http_address': 'http://167.99.181.173/:8888',\n\t'key_provider': '5KjwNHXDMwdEbzBx858GpDqGM2u3wD4rYkYNskRdcgTZTcQEBQZ'\n})\n\nresp = eos.newaccount({\n\t'creator': 'eosio',\n\t'name': 'mytestacc13',\n\t'owner_public_key': 'EOS7vTHtMbZ1g9P8BiyAGD7Ni7H6UALVLVCW13xZrXT4heCBke3it',\n\t'active_public_key': 'EOS8KKKYBBdwrmXRRynDXSxTX2qoT9TA4agahXXF4ccUgRCy81RNc',\n\t'buyrambytes_bytes': 8192,\n\t'delegatebw_stake_net_quantity': '100.0000 SYS',\n\t'delegatebw_stake_cpu_quantity': '100.0000 SYS',\n\t'delegatebw_transfer': 0\n})\n```\n\n### Push transaction into contract\n```python\nfrom eosjs_python import Eos\n\neos = Eos({\n\t'http_address': 'http://172.18.0.1:8888',\n\t'key_provider': '5JhhMGNPsuU42XXjZ57FcDKvbb7KLrehN65tdTQFrH51uruZLHi'\n})\n\n#cleos push action eosio.token transfer '[\"eva\",\"rider1\",\"1 EVA\",\"initial balance\"]' -p eva\n\neos.push_transaction('eosio.token','transfer','eva','active',{\n\t\"from\":\"eva\",\n\t\"to\":\"mytestacc13\",\n\t\"quantity\":\"1 EVA\",\n\t\"memo\":\"\"\n})\n```\n\n### Reading a table\n```python\nfrom eosjs_python import Eos\neos = Eos({\n\t'http_address': 'http://127.0.0.1:8888',\n\t'key_provider': '5JhhMGNPsuU42XXjZ57FcDKvbb7KLrehN65tdTQFrH51uruZLHi'\n})\neos.get_table('eva', 'eva', 'communities')\n\n```\n\n### Getting Currency Balance\n\n```python\nfrom eosjs_python import Eos\n\neos = Eos({\n    'http_address': 'http://localhost:8888',\n    'key_provider': '5KR93vcDVtJJ8eZ3td4gU87p8PPhsfgK5NZKyDij83kSRJ2UTrM'\n})\n\neos.get_currency_balance('eosio.token', 'xcdzdbkqamvu', 'EVA')\n\n```\n\n### Send secrets\nThis is useful to share secrets on a public blockchain \n```python\n/*\nSender\nPrivate key: 5KiKyYPR3tJjwRt1XsJXXofD3YsYUSzSfvPg7pCSNDv64Av28ib\nPublic key: EOS6Fz1GpMuxh3ZXGX34N7B7xY9VP5hmxcxRYBvgSkJRT4eGWPUvD\n\nReceiver\nPrivate key: 5KhAG8w3K8HVDaJLY6HxZTrfrZs7mjU9Afih5axxpRLNW6rvEDf\nPublic key: EOS6E3T6S2xy5Fu2fZrZbHRsPNHjx5JXXFkBwQA9gCrgVTDALxQeC\n*/\nfrom eosjs_python import Eos\nencrypted_msg = Eos.encrypt_chain_message(\"5KiKyYPR3tJjwRt1XsJXXofD3YsYUSzSfvPg7pCSNDv64Av28ib\", \"EOS6E3T6S2xy5Fu2fZrZbHRsPNHjx5JXXFkBwQA9gCrgVTDALxQeC\", \"secret chain message\")\nplaintext = Eos.decrypt_chain_message(\"5KhAG8w3K8HVDaJLY6HxZTrfrZs7mjU9Afih5axxpRLNW6rvEDf\", \"EOS6Fz1GpMuxh3ZXGX34N7B7xY9VP5hmxcxRYBvgSkJRT4eGWPUvD\", encrypted_msg)\nprint(plaintext)\n```\n## Contributing\n\nSome work still has to be done to interface with all eosjs possibilities, feel free to send some pull requests!\n","funding_links":[],"categories":["Language Support"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoEvaCom%2Feosjs_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGoEvaCom%2Feosjs_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoEvaCom%2Feosjs_python/lists"}