{"id":24316500,"url":"https://github.com/jferard/py4lo","last_synced_at":"2025-09-27T00:32:19.160Z","repository":{"id":170593448,"uuid":"72956539","full_name":"jferard/py4lo","owner":"jferard","description":"Py4LO is a simple toolkit to help you write and include Python scripts in LibreOffice Calc spreadsheets.","archived":false,"fork":false,"pushed_at":"2025-01-15T20:54:28.000Z","size":14163,"stargazers_count":5,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T22:56:58.708Z","etag":null,"topics":["developer-tools","libreoffice","macros","python","python-script"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jferard.png","metadata":{"files":{"readme":"README.rst","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":"2016-11-05T22:21:07.000Z","updated_at":"2025-01-15T20:54:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c980ebb6-d936-4ca5-bba3-916ea2560a8e","html_url":"https://github.com/jferard/py4lo","commit_stats":null,"previous_names":["jferard/py4lo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Fpy4lo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Fpy4lo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Fpy4lo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jferard%2Fpy4lo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jferard","download_url":"https://codeload.github.com/jferard/py4lo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234365064,"owners_count":18820592,"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":["developer-tools","libreoffice","macros","python","python-script"],"created_at":"2025-01-17T12:56:41.995Z","updated_at":"2025-09-27T00:32:13.791Z","avatar_url":"https://github.com/jferard.png","language":"Python","readme":"|Build Status| |Code Coverage|\n\nPy4LO (Python For LibreOffice)\n==============================\n\nCopyright (C) J. Férard 2016-2024\n\nPy4LO is a simple toolkit to help you write and include Python macros in\nLibreOffice Calc spreadsheets.\nUnder **GPL v.3**\n\nPy4LO requires Python \u003e= 3.8.\n\nOverview\n--------\n\nThe LibreOffice Basic is limited and Python is a far more powerful language\nto write macros. Py4LO helps you to pack your Python macros in a LibreOffice\nCalc or Writer document and offers a small but useful library to access\nLibreOffice objects.\n\nSee also:\n\n* https://github.com/jferard/py4lo/blob/master/QuickStart.rst\n* https://github.com/jferard/py4lo/blob/master/From_LO_Basic_to_Python.rst\n\nFeatures\n--------\n* Test Python macros, embed them in an existing LibreOffice document and open\n  this document in one command line;\n* Generate a debug new document from an existing Python macro\n* Interface with Xray/MRI\n* Helpers to access cells, add filters, create new documents, get used rows or data arrays\n* Helpers to convert XNameAccess to dicts and XIndexAccess to lists\n* Access ODS files content without opening them\n* ...\n\nWhy Py4LO?\n----------\nWhen I created Py4LO, back in 2016, I did not know `APSO\n\u003chttps://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python\u003e`_,\nthe \"Alternative Script Organizer for Python\" (APSO was created in 2012, but\nreleased on *extensions.libreoffice.org* in november 2016). Thus I had to\ndevelop my own solution. I was programming in Java, and immediately tought of\nsomething like `Maven \u003chttps://en.wikipedia.org/wiki/Apache_Maven\u003e`_: a command\nline tool that would test and compile my document with the macros. Py4LO was born.\n\nSoon, I created a library to help me create new macros fasters. This design\nmight seem complex (\"You mean I have to rerun the command each time\nI modify a script?\" - \"Yes!\"), but helps to keep the code clean and testable.\n\nThe library\n-----------\nThe library contains the following modules:\n\n- |py4lo_typing|_: basic typing support for UNO objects, and helps the\n  IDE to check types.\n- |py4lo_commons|_: some helpful methods and classes (a simple bus,\n  access to a config file, ...) for Python objects (strs, lists, ...).\n- |py4lo_helper|_: manipulate LO objects (cells, rows, sheets, ...).\n- |py4lo_dialogs|_: create some useful dialogs.\n- |py4lo_io|_: read and write Calc documents.\n- |py4lo_ods|_: read ods documents in pure Python (document\n  content is parsed as XML, and never opened with LO).\n- |py4lo_base|_: work with LibreOffice Base documents.\n- |py4lo_sqlite3|_: use SQLite on Windows systems.\n\nThe lib modules are subject to the \"classpath\" exception of the GPLv3 (see\nhttps://www.gnu.org/software/classpath/license.html).\n\n.. |py4lo_typing| replace:: ``py4lo_typing``\n.. _py4lo_typing: https://github.com/jferard/py4lo/blob/master/lib/py4lo_typing.py\n\n.. |py4lo_commons| replace:: ``py4lo_commons``\n.. _py4lo_commons: https://github.com/jferard/py4lo/blob/master/lib/py4lo_commons.py\n\n.. |py4lo_helper| replace:: ``py4lo_helper``\n.. _py4lo_helper: https://github.com/jferard/py4lo/blob/master/lib/py4lo_helper.py\n\n.. |py4lo_dialogs| replace:: ``py4lo_dialogs``\n.. _py4lo_dialogs: https://github.com/jferard/py4lo/blob/master/lib/py4lo_dialogs.py\n\n.. |py4lo_io| replace:: ``py4lo_io``\n.. _py4lo_io: https://github.com/jferard/py4lo/blob/master/lib/py4lo_io.py\n\n.. |py4lo_ods| replace:: ``py4lo_ods``\n.. _py4lo_ods: https://github.com/jferard/py4lo/blob/master/lib/py4lo_ods.py\n\n.. |py4lo_base| replace:: ``py4lo_base``\n.. _py4lo_base: https://github.com/jferard/py4lo/blob/master/lib/py4lo_base.py\n\n.. |py4lo_sqlite3| replace:: ``py4lo_sqlite3``\n.. _py4lo_sqlite3: https://github.com/jferard/py4lo/blob/master/lib/py4lo_sqlite3.py\n\nInstallation\n------------\n\nNeeds Python 3.\n\nJust ``git clone`` the repo:\n\n.. code-block:: bash\n\n    git clone https://github.com/jferard/py4lo.git\n\nThen install requirements (you may need to be in adminstrator mode):\n\n.. code-block:: bash\n\n    pip3 install -r requirements.txt\n\nFor Ubuntu:\n\n.. code-block:: bash\n\n    sudo apt-get install libreoffice-script-provider-python\n\n\nTest\n----\n\nFrom the py4lo directory:\n\n.. code-block:: bash\n\n   python3 -m pytest --cov-report term-missing --ignore=examples --ignore=megalinter-reports --cov=py4lo --cov=lib \u0026\u0026 python3 -m pytest --cov-report term-missing --ignore=examples --ignore=test --ignore=megalinter-reports --ignore=py4lo/__main__.py --cov-append --doctest-modules --cov=lib\n\n.. |Build Status| image:: https://github.com/jferard/py4lo/actions/workflows/workflow.yml/badge.svg\n    :target: https://github.com/jferard/py4lo/actions/workflows/workflow.yml\n.. |Code Coverage| image:: https://codecov.io/github/jferard/py4lo/branch/master/graph/badge.svg\n    :target: https://codecov.io/github/jferard/py4lo\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjferard%2Fpy4lo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjferard%2Fpy4lo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjferard%2Fpy4lo/lists"}