ooouno


Nameooouno JSON
Version 2.1.2 PyPI version JSON
download
home_pagehttps://github.com/Amourspirit/python-ooouno
SummaryInterfaces and classes for LibreOffice (uno)
upload_time2023-05-25 21:45:57
maintainer
docs_urlNone
author:Barry-Thomas-Paul: Moss
requires_python>=3.7,<4.0
licenseApache Software License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =========================
Welcome to ooouno's docs!
=========================

|lic| |pver| |pwheel| |github|

ooouno
======

**ooouno** is a library of all *(more than 4300)* classes, typings and types for the LibreOffice `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_.

**ooouno** is for version ``7.4`` of LibreOffice `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_.

More about `LibreOffice <https://www.libreoffice.org/>`_.

Docs
====

Read the docs `here <https://python-ooouno.readthedocs.io/>`_

Installation
============

CONDA
-----

**ooouno** on `Anaconda <https://anaconda.org/conda-forge/ooouno>`_

.. code-block:: bash

    $ conda install -c conda-forge ooouno


For LibreOffice <= ``7.3``
    ``$ conda install -c conda-forge "ooouno>=0.2.5, <1.0"``


For LibreOffice <= ``7.2``
    ``$ conda install -c conda-forge "ooouno<0.2"``

PIP
---

**ooouno** `PyPI <https://pypi.org/project/ooouno/>`_

.. code-block:: bash

    $ pip install ooouno

For LibreOffice <= ``7.3``
    ``pip install "ooouno>= 0.2.5, < 1.0"``

For LibreOffice <= ``7.2``
    ``pip install "ooouno<0.2"``


Usage
=====

All class found in LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ are recreated in this library.

For instance:
    | ``from ooo.dyn.style.line_spacing import LineSpacing`` is equivalent to
    | ``from com.sun.star.style import LineSpacing``


Namespace
---------

There are four namespaces representing LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ in this library.

ooo.lo
++++++

| Namespace ``ooo.lo`` contains all static python classes. The format is
| ``ooo.lo.<ns>.<snake_case_name>.<PascalCaseName>``

.. code-block:: python

    from ooo.lo.uno.x_interface import XInterface

    def foo(input:str) -> XInterface: ...

ooo.dyn
+++++++

Namespace ``ooo.dyn`` contains static and dynamic classes depending on class type.
The format is ``ooo.dyn.<ns>.<snake_case_name>.<PascalCaseName>``

This namespace has dynamic classes that are changed at runtime.
For classes that are dynamic are fully or partially replaced by UNO version at runtime.

This allows for typings while in design time (working in IDE) and at runtime UNO classes are created instead.

.. code-block:: python

    >>> from ooo.dyn.style.line_spacing import LineSpacing as DynLineSpacing
    >>> from ooo.lo.style.line_spacing import LineSpacing as LoLineSpacing
    >>> dyn_lns = DynLineSpacing(Height=10, Mode=3)
    >>> lo_lns = LoLineSpacing(Height=10, Mode=3)
    >>> assert dyn_lns.Height == 10
    >>> assert dyn_lns.Mode == 3
    >>> type(dyn_lns).__name__
    'com.sun.star.style.LineSpacing'
    >>> type(lo_lns).__name__
    'LineSpacing'
    

ooo.csslo
+++++++++

As of version ``2.0.0`` the ``ooo.csslo`` namespace is deprecated. Use the ``ooo.lo`` namespace instead.

| Namespace ``ooo.csslo`` contains static classes as LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ style imports.
| The format is ``ooo.csslo.<ns>.<PascalCaseName>``

When importing from ``ooo.csslo`` all classes in that namespace are also loaded.
Under some circumstances this may not be desired. Such as packaging with `stickytape <https://pypi.org/project/stickytape/>`_.

.. code-block:: python

    >>> from ooo.lo.style.line_spacing import LineSpacing as LoLineSpacing
    >>> from ooo.csslo.style import LineSpacing as CssLineSpacing
    >>> LoLineSpacing is CssLineSpacing
    True
    >>> ls = CssLineSpacing()
    >>> type(ls).__name__
    'LineSpacing'

ooo.cssdyn
++++++++++

As of version ``2.0.0`` the ``ooo.cssdyn`` namespace is deprecated. Use the ``ooo.dyn`` namespace instead.

Namespace ``ooo.cssdyn`` contains static and dynamic classes depending on class type as LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ style imports.

When importing from ``ooo.cssdyn`` all classes in that namespace are also loaded.
Under some circumstances this may not be desired. Such as packaging with `stickytape <https://pypi.org/project/stickytape/>`_.

.. code-block:: python

    >>> from ooo.dyn.style.line_spacing import LineSpacing as DynLineSpacing
    >>> from ooo.cssdyn.style import LineSpacing as CssLineSpacing
    >>> DynLineSpacing is CssLineSpacing
    True
    >>> ls = CssLineSpacing()
    >>> type(ls).__name__
    'com.sun.star.style.LineSpacing'


Generally speaking
------------------

When using ooo as typings then import from ``ooo.lo`` or ``ooo.csslo``.

When using ooo interactively such as creating struts, enums, singletons, const classes then
import from ``ooo.dyn`` or ``ooo.cssdyn``.

Development
-----------

Development environment is configured using `poetry <https://python-poetry.org/>`__.

It is recommended to install virtual environment locally.

To Configure poetry to install virtual environment in local folder:

.. code-block::

    poetry config virtualenvs.in-project true

After virtual environment has been set up.

Linux/Mac
+++++++++

Link UNO files into virtual environment.

.. code-block::

    oooenv cmd-link -a

Windows
+++++++

Run toggle command to set virtual environment.

.. code-block::

    oooenv env -t

See Also
++++++++

- `oooenv <https://pypi.org/project/oooenv/>`__
- `OOO Development Tools - Develop Docs <https://python-ooo-dev-tools.readthedocs.io/en/latest/dev_docs/dev_notes.html>`__

Related Projects
----------------

* `OOO Development Tools <https://github.com/Amourspirit/python_ooo_dev_tools>`__
* `LibreOffice API Typings <https://github.com/Amourspirit/python-types-unopy>`__
* `ScriptForge Typings <https://github.com/Amourspirit/python-types-scriptforge>`__
* `Access2base Typings <https://github.com/Amourspirit/python-types-access2base>`__
* `LibreOffice Python UNO Examples <https://github.com/Amourspirit/python-ooouno-ex>`__
* `LibreOffice Developer Search <https://github.com/Amourspirit/python_lo_dev_search>`__
* `LibreOffice UNO Typings <https://github.com/Amourspirit/python-types-uno-script>`__
* `OOO UNO TEMPLATE <https://github.com/Amourspirit/ooo_uno_tmpl>`__

.. |lic| image:: https://img.shields.io/github/license/Amourspirit/python-ooouno
    :alt: License Apache

.. |pver| image:: https://img.shields.io/pypi/pyversions/ooouno
    :alt: PyPI - Python Version

.. |pwheel| image:: https://img.shields.io/pypi/wheel/ooouno
    :alt: PyPI - Wheel

.. |github| image:: https://img.shields.io/badge/GitHub-100000?style=plastic&logo=github&logoColor=white
    :target: https://github.com/Amourspirit/python-ooouno
    :alt: Github

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Amourspirit/python-ooouno",
    "name": "ooouno",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": ":Barry-Thomas-Paul: Moss",
    "author_email": "vibrationoflife@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/53/50/b331a482cb9c2a5575295b6598b9447259f156deb8eff308bc74e6780f88/ooouno-2.1.2.tar.gz",
    "platform": null,
    "description": "=========================\nWelcome to ooouno's docs!\n=========================\n\n|lic| |pver| |pwheel| |github|\n\nooouno\n======\n\n**ooouno** is a library of all *(more than 4300)* classes, typings and types for the LibreOffice `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_.\n\n**ooouno** is for version ``7.4`` of LibreOffice `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_.\n\nMore about `LibreOffice <https://www.libreoffice.org/>`_.\n\nDocs\n====\n\nRead the docs `here <https://python-ooouno.readthedocs.io/>`_\n\nInstallation\n============\n\nCONDA\n-----\n\n**ooouno** on `Anaconda <https://anaconda.org/conda-forge/ooouno>`_\n\n.. code-block:: bash\n\n    $ conda install -c conda-forge ooouno\n\n\nFor LibreOffice <= ``7.3``\n    ``$ conda install -c conda-forge \"ooouno>=0.2.5, <1.0\"``\n\n\nFor LibreOffice <= ``7.2``\n    ``$ conda install -c conda-forge \"ooouno<0.2\"``\n\nPIP\n---\n\n**ooouno** `PyPI <https://pypi.org/project/ooouno/>`_\n\n.. code-block:: bash\n\n    $ pip install ooouno\n\nFor LibreOffice <= ``7.3``\n    ``pip install \"ooouno>= 0.2.5, < 1.0\"``\n\nFor LibreOffice <= ``7.2``\n    ``pip install \"ooouno<0.2\"``\n\n\nUsage\n=====\n\nAll class found in LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ are recreated in this library.\n\nFor instance:\n    | ``from ooo.dyn.style.line_spacing import LineSpacing`` is equivalent to\n    | ``from com.sun.star.style import LineSpacing``\n\n\nNamespace\n---------\n\nThere are four namespaces representing LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ in this library.\n\nooo.lo\n++++++\n\n| Namespace ``ooo.lo`` contains all static python classes. The format is\n| ``ooo.lo.<ns>.<snake_case_name>.<PascalCaseName>``\n\n.. code-block:: python\n\n    from ooo.lo.uno.x_interface import XInterface\n\n    def foo(input:str) -> XInterface: ...\n\nooo.dyn\n+++++++\n\nNamespace ``ooo.dyn`` contains static and dynamic classes depending on class type.\nThe format is ``ooo.dyn.<ns>.<snake_case_name>.<PascalCaseName>``\n\nThis namespace has dynamic classes that are changed at runtime.\nFor classes that are dynamic are fully or partially replaced by UNO version at runtime.\n\nThis allows for typings while in design time (working in IDE) and at runtime UNO classes are created instead.\n\n.. code-block:: python\n\n    >>> from ooo.dyn.style.line_spacing import LineSpacing as DynLineSpacing\n    >>> from ooo.lo.style.line_spacing import LineSpacing as LoLineSpacing\n    >>> dyn_lns = DynLineSpacing(Height=10, Mode=3)\n    >>> lo_lns = LoLineSpacing(Height=10, Mode=3)\n    >>> assert dyn_lns.Height == 10\n    >>> assert dyn_lns.Mode == 3\n    >>> type(dyn_lns).__name__\n    'com.sun.star.style.LineSpacing'\n    >>> type(lo_lns).__name__\n    'LineSpacing'\n    \n\nooo.csslo\n+++++++++\n\nAs of version ``2.0.0`` the ``ooo.csslo`` namespace is deprecated. Use the ``ooo.lo`` namespace instead.\n\n| Namespace ``ooo.csslo`` contains static classes as LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ style imports.\n| The format is ``ooo.csslo.<ns>.<PascalCaseName>``\n\nWhen importing from ``ooo.csslo`` all classes in that namespace are also loaded.\nUnder some circumstances this may not be desired. Such as packaging with `stickytape <https://pypi.org/project/stickytape/>`_.\n\n.. code-block:: python\n\n    >>> from ooo.lo.style.line_spacing import LineSpacing as LoLineSpacing\n    >>> from ooo.csslo.style import LineSpacing as CssLineSpacing\n    >>> LoLineSpacing is CssLineSpacing\n    True\n    >>> ls = CssLineSpacing()\n    >>> type(ls).__name__\n    'LineSpacing'\n\nooo.cssdyn\n++++++++++\n\nAs of version ``2.0.0`` the ``ooo.cssdyn`` namespace is deprecated. Use the ``ooo.dyn`` namespace instead.\n\nNamespace ``ooo.cssdyn`` contains static and dynamic classes depending on class type as LO `API <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html>`_ style imports.\n\nWhen importing from ``ooo.cssdyn`` all classes in that namespace are also loaded.\nUnder some circumstances this may not be desired. Such as packaging with `stickytape <https://pypi.org/project/stickytape/>`_.\n\n.. code-block:: python\n\n    >>> from ooo.dyn.style.line_spacing import LineSpacing as DynLineSpacing\n    >>> from ooo.cssdyn.style import LineSpacing as CssLineSpacing\n    >>> DynLineSpacing is CssLineSpacing\n    True\n    >>> ls = CssLineSpacing()\n    >>> type(ls).__name__\n    'com.sun.star.style.LineSpacing'\n\n\nGenerally speaking\n------------------\n\nWhen using ooo as typings then import from ``ooo.lo`` or ``ooo.csslo``.\n\nWhen using ooo interactively such as creating struts, enums, singletons, const classes then\nimport from ``ooo.dyn`` or ``ooo.cssdyn``.\n\nDevelopment\n-----------\n\nDevelopment environment is configured using `poetry <https://python-poetry.org/>`__.\n\nIt is recommended to install virtual environment locally.\n\nTo Configure poetry to install virtual environment in local folder:\n\n.. code-block::\n\n    poetry config virtualenvs.in-project true\n\nAfter virtual environment has been set up.\n\nLinux/Mac\n+++++++++\n\nLink UNO files into virtual environment.\n\n.. code-block::\n\n    oooenv cmd-link -a\n\nWindows\n+++++++\n\nRun toggle command to set virtual environment.\n\n.. code-block::\n\n    oooenv env -t\n\nSee Also\n++++++++\n\n- `oooenv <https://pypi.org/project/oooenv/>`__\n- `OOO Development Tools - Develop Docs <https://python-ooo-dev-tools.readthedocs.io/en/latest/dev_docs/dev_notes.html>`__\n\nRelated Projects\n----------------\n\n* `OOO Development Tools <https://github.com/Amourspirit/python_ooo_dev_tools>`__\n* `LibreOffice API Typings <https://github.com/Amourspirit/python-types-unopy>`__\n* `ScriptForge Typings <https://github.com/Amourspirit/python-types-scriptforge>`__\n* `Access2base Typings <https://github.com/Amourspirit/python-types-access2base>`__\n* `LibreOffice Python UNO Examples <https://github.com/Amourspirit/python-ooouno-ex>`__\n* `LibreOffice Developer Search <https://github.com/Amourspirit/python_lo_dev_search>`__\n* `LibreOffice UNO Typings <https://github.com/Amourspirit/python-types-uno-script>`__\n* `OOO UNO TEMPLATE <https://github.com/Amourspirit/ooo_uno_tmpl>`__\n\n.. |lic| image:: https://img.shields.io/github/license/Amourspirit/python-ooouno\n    :alt: License Apache\n\n.. |pver| image:: https://img.shields.io/pypi/pyversions/ooouno\n    :alt: PyPI - Python Version\n\n.. |pwheel| image:: https://img.shields.io/pypi/wheel/ooouno\n    :alt: PyPI - Wheel\n\n.. |github| image:: https://img.shields.io/badge/GitHub-100000?style=plastic&logo=github&logoColor=white\n    :target: https://github.com/Amourspirit/python-ooouno\n    :alt: Github\n",
    "bugtrack_url": null,
    "license": "Apache Software License",
    "summary": "Interfaces and classes for LibreOffice (uno)",
    "version": "2.1.2",
    "project_urls": {
        "Documentation": "https://github.com/Amourspirit/python-ooouno",
        "Homepage": "https://github.com/Amourspirit/python-ooouno",
        "Repository": "https://github.com/Amourspirit/python-ooouno"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f165832e2ab8eaffb1a560e4580b939cd23b4b092d73f2499b4368c04beab7c",
                "md5": "be644f5c2fc5f0ea1a8c22936222d469",
                "sha256": "d06635941300d8e2a489b03592d9bfb9e70167c379352c275d3b96ac0586f4de"
            },
            "downloads": -1,
            "filename": "ooouno-2.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be644f5c2fc5f0ea1a8c22936222d469",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 9774512,
            "upload_time": "2023-05-25T21:45:53",
            "upload_time_iso_8601": "2023-05-25T21:45:53.127996Z",
            "url": "https://files.pythonhosted.org/packages/9f/16/5832e2ab8eaffb1a560e4580b939cd23b4b092d73f2499b4368c04beab7c/ooouno-2.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5350b331a482cb9c2a5575295b6598b9447259f156deb8eff308bc74e6780f88",
                "md5": "c80c4caf94e537722f15410336e3699e",
                "sha256": "3152a1769c0baa7d66efe0ae4b909a0a3f882562eb283d2672cbed2e31e01b82"
            },
            "downloads": -1,
            "filename": "ooouno-2.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c80c4caf94e537722f15410336e3699e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 2190381,
            "upload_time": "2023-05-25T21:45:57",
            "upload_time_iso_8601": "2023-05-25T21:45:57.153962Z",
            "url": "https://files.pythonhosted.org/packages/53/50/b331a482cb9c2a5575295b6598b9447259f156deb8eff308bc74e6780f88/ooouno-2.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-25 21:45:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Amourspirit",
    "github_project": "python-ooouno",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ooouno"
}
        
Elapsed time: 0.06932s