{"id":22261741,"url":"https://github.com/jsonfm/xades-bes-sri","last_synced_at":"2025-03-25T13:41:51.175Z","repository":{"id":224292533,"uuid":"762925246","full_name":"jsonfm/xades-bes-sri","owner":"jsonfm","description":"🧾 A library for signing XML documents using the XADES-BES algorithm, which follows the guidelines of the SRI of Ecuador","archived":false,"fork":false,"pushed_at":"2024-02-25T15:53:19.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T12:30:11.817Z","etag":null,"topics":["bes","ecuador","facturacion-electronica","python","sri","xades","xml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsonfm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-25T04:27:54.000Z","updated_at":"2024-12-09T03:37:10.000Z","dependencies_parsed_at":"2024-02-25T05:28:11.914Z","dependency_job_id":"900447fe-fabe-41f4-86d8-ec6fcccda804","html_url":"https://github.com/jsonfm/xades-bes-sri","commit_stats":null,"previous_names":["jsonfm/xades-bes-sri"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fxades-bes-sri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fxades-bes-sri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fxades-bes-sri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsonfm%2Fxades-bes-sri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsonfm","download_url":"https://codeload.github.com/jsonfm/xades-bes-sri/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245472667,"owners_count":20621155,"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":["bes","ecuador","facturacion-electronica","python","sri","xades","xml"],"created_at":"2024-12-03T09:14:08.931Z","updated_at":"2025-03-25T13:41:51.150Z","avatar_url":"https://github.com/jsonfm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 🧾⚡️ XADES BES SRI\n\nAn implementation of xades bes sri python to sign XML documents for e-invoicing.\n\n### ⚙️ Technologies\n\n- lxml\n- cryptography\n- xml\n\n### 📦 Installation\n\n```\npip install git+https://github.com/jsonfm/xades-bes-sri@0.1.0\n```\n\n### ✨ Read .p12 file\n\n```python\nfrom xadessri import get_private_key\n\n\nwith open(\"/signature.p12\", mode=\"rb\") as file:\n    p12 = file.read() # bytes\n\n\np12 = get_private_key(p12, \"password\")\nprint(p12.key)\nprint(p12.cert)\n```\n\n### ✨ Sign a XML\n\n```python\nfrom xadessri import sign_xml\n\n\nwith open(\"/signature.p12\", mode=\"rb\") as file:\n    p12 = file.read() # bytes\n\n\nxml = \"\"\"\u003cxml\u003e\u003cdata\u003esome important data\u003c/data\u003e\u003c/xml\u003e\"\"\"\n\nsigned = sign_xml(p12, \"password\", xml)\n\nprint(\"signed: \", signed)\n```\n\n### 🔆 Credits\n\nProject Inspired by [`xades-bes-sri-ec`](https://github.com/alfredo138923/xades-bes-sri-ec.git) created by [@alfredo138923](https://github.com/alfredo138923). Thanks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonfm%2Fxades-bes-sri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsonfm%2Fxades-bes-sri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsonfm%2Fxades-bes-sri/lists"}