{"id":21987005,"url":"https://github.com/marcodeltutto/ecl-api","last_synced_at":"2026-02-21T04:03:42.884Z","repository":{"id":255382487,"uuid":"849433136","full_name":"marcodeltutto/ecl-api","owner":"marcodeltutto","description":"To interface with the Electronic Logbook via python","archived":false,"fork":false,"pushed_at":"2024-08-29T20:27:27.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T05:25:20.945Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/marcodeltutto.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T15:28:53.000Z","updated_at":"2024-08-29T20:23:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a9db5d1-20d3-47cb-8b7b-fd43147c6433","html_url":"https://github.com/marcodeltutto/ecl-api","commit_stats":null,"previous_names":["marcodeltutto/ecl-api"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/marcodeltutto/ecl-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2Fecl-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2Fecl-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2Fecl-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2Fecl-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcodeltutto","download_url":"https://codeload.github.com/marcodeltutto/ecl-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcodeltutto%2Fecl-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266585663,"owners_count":23952163,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-29T18:26:37.074Z","updated_at":"2025-10-12T20:05:35.143Z","avatar_url":"https://github.com/marcodeltutto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ecl-api\n\n[![PyPI - Version](https://img.shields.io/pypi/v/ecl-api.svg)](https://pypi.org/project/ecl-api)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ecl-api.svg)](https://pypi.org/project/ecl-api)\n![pylint](https://github.com/marcodeltutto/ecl-api/actions/workflows/pylint.yml/badge.svg)\n\n-----\n\nThe Electronic Collaboration Logbook ([ECL](https://cdcvs.fnal.gov/redmine/projects/crl)) is an e-logbook used at FNAL. This package allows retrieving and posting entries via Python using the ECL [XML/REST API](https://cdcvs.fnal.gov/redmine/projects/crl/wiki/ECL_XML_API).\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\n## Installation\n\n```console\npip install ecl-api\n```\n\n## Usage\n\nStart a connection with the ECL:\n\n```python\nfrom ecl_api import ECL, ECLEntry\n\npassword = \"your_ecl_pwd\"\nurl = \"your_ecl_link\" # e.g. 'https://dbweb9.fnal.gov:8443/ECL/sbnd/E'\n\necl = ECL(url=url, user='sbndprm', password=password)\n```\n\nPost a generic entry:\n```python\nentry = ECLEntry(category='Purity Monitors', text='Example text', preformatted=True)\n\nentry.add_image(name='Image Name', filename='/path/to/image.png')\n\necl.post(entry, do_post=False)\n```\n\nPost a form:\n```python\nentry = ECLEntry(category='Shift', formname='Shift run start checklist - v1')\n\nform = {\n    \"Maximize the window\": \"Yes\",\n    \"Date\": \"07/23/24\",\n    \"Time\": \"19:39:58\",\n    \"Run number\": \"00000\",\n    \"DAQ Components\": \"testentry\",\n    \"Configuration\": \"testentry\" \n}\n\nentry.set_form_elements(form)\n\nprint(entry.show(pretty=True))\n\necl.post(entry, do_post=False)\n```\n\nRetrieve an entry\n```python\n\necl.get_entry(entry_id=7252)\n```\n\nRetrieve the last N entries in a certain category\n\n```python\ntext = ecl.search(category='Shift', limit=3)\n```\n\nUnpack content of `text`:\n```python\nimport xml.etree.ElementTree as ET\n\nxml = ET.fromstring(text)\nentries = xml.findall('./entry')\nfor entry in entries:\n\tprint(entry.attrib, entry.tag)\n\t...\n```\n\n\n## License\n\n`ecl-api` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodeltutto%2Fecl-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcodeltutto%2Fecl-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcodeltutto%2Fecl-api/lists"}