genmypy


Namegenmypy JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/rospypi/genmypy
SummaryA Python stub generator from genmsg specs
upload_time2021-05-09 11:47:31
maintainer
docs_urlNone
authorYuki Igarashi, Tamamki Nishino
requires_python
licenseApache License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =======
genmypy
=======

A Python stub generator from genmsg specs

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

If you use catkin and need CMake support for the ``genmypy`` generator, clone the repository and add it to your catkin workspace.

.. code:: sh

    cd /path/to/your/ws
    git clone https://github.com/rospypi/genmypy.git


If you don't need the cmake support, you can also install it from `pypi.org <https://pypi.org/>`_:

.. code:: sh

    pip install genmypy

Usage
=====

catkin
------

Add ``genmypy`` along with ``message_generation`` to ``find_package`` in
CMakeLists.txt. ``genmsg`` will find ``genmypy`` automatically when
building msg/srv files.

Also, keep in mind that your package should have the build dependency
for ``genmypy`` in ``package.xml`` to make sure that catkin finishes the
build of ``genmypy`` before building your package.

Examples:

- CMakeLists.txt
    .. code:: cmake

        find_package(catkin REQUIRED COMPONENTS std_msgs message_generation genmypy)
- package.xml
    .. code:: xml

        <build_depend>genmypy</build_depend>

CLI
---

::

    $ genmypy --help
    Usage: genmypy [-h] {msg,srv,module} ...
    positional arguments:
      {msg,srv,module}
        msg             Generate stub files from .msg files
        srv             Generate stub files from .srv files
        module          Generate __init__.pyi from a msg/srv directory

    optional arguments:
      -h, --help        show this help message and exit

Examples:
~~~~~~~~~

.. code:: sh

    # Message files
    $ genmypy msg custom_msgs custom_msgs/msg/Custom.msg
    $ genmypy msg std_msgs --out-dir out /opt/ros/noetic/share/std_msgs/msg/Header.msg
    $ genmypy msg sensor_msgs --out-dir out \
        -Istd_msgs:/opt/ros/noetic/share/std_msgs/msg \
        -Isensor_msgs:/opt/ros/noetic/share/sensor_msgs/msg \
        /opt/ros/noetic/share/sensor_msgs/msg/PointCloud2.msg

    # Service files
    $ genmypy srv custom_msgs custom_msgs/srv/Custom.msg
    $ genmypy srv nav_msgs --out-dir out \
        -Istd_msgs:/opt/ros/noetic/share/std_msgs/msg \
        -Isensor_msgs:/opt/ros/noetic/share/sensor_msgs/msg \
        /opt/ros/noetic/share/sensor_msgs/srv/SetCameraInfo.srv

    # Module files
    $ genmypy module custom_msgs/msg
    $ genmypy module --module-finder py --out out \
        /opt/ros/noetic/lib/python2.7/dist-packages/std_msgs/msg/

``genmypy msg`` / ``genmypy srv``:

.. code:: sh

    Usage: genmypy {msg,srv} [-h] [--out-dir OUT_DIR]
                            [--include-path INCLUDE_PATH]
                            package files [files ...]

    positional arguments:
      package               Package name of given files
      files                 Files to generate stubs

    optional arguments:
      -h, --help            show this help message and exit
      --out-dir OUT_DIR     Output directory. If the option is unset, each stub
                            file will be generated in the same directory as each
                            input.
      --include-path INCLUDE_PATH, -I INCLUDE_PATH
                            Include paths for processing given files

``genmypy module``:

.. code:: sh

    Usage: genmypy module [-h] [--out-dir OUT_DIR] package_dir

    Positional arguments:
      package_dir        Package directory to create __init__.pyi

    Optional arguments:
      -h, --help         show this help message and exit
      --out-dir OUT_DIR  Output directory. If the option is unset, __init__.pyi
                         will be generated in the same directory as package_dir.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rospypi/genmypy",
    "name": "genmypy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Yuki Igarashi, Tamamki Nishino",
    "author_email": "me@bonprosoft.com, otamachan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/83/1c/f66d7b99b84ce0b67c37aee27ab25a92bdc9a164ec33e7acfba183d2f770/genmypy-0.3.1.tar.gz",
    "platform": "",
    "description": "=======\ngenmypy\n=======\n\nA Python stub generator from genmsg specs\n\nInstallation\n============\n\nIf you use catkin and need CMake support for the ``genmypy`` generator, clone the repository and add it to your catkin workspace.\n\n.. code:: sh\n\n    cd /path/to/your/ws\n    git clone https://github.com/rospypi/genmypy.git\n\n\nIf you don't need the cmake support, you can also install it from `pypi.org <https://pypi.org/>`_:\n\n.. code:: sh\n\n    pip install genmypy\n\nUsage\n=====\n\ncatkin\n------\n\nAdd ``genmypy`` along with ``message_generation`` to ``find_package`` in\nCMakeLists.txt. ``genmsg`` will find ``genmypy`` automatically when\nbuilding msg/srv files.\n\nAlso, keep in mind that your package should have the build dependency\nfor ``genmypy`` in ``package.xml`` to make sure that catkin finishes the\nbuild of ``genmypy`` before building your package.\n\nExamples:\n\n- CMakeLists.txt\n    .. code:: cmake\n\n        find_package(catkin REQUIRED COMPONENTS std_msgs message_generation genmypy)\n- package.xml\n    .. code:: xml\n\n        <build_depend>genmypy</build_depend>\n\nCLI\n---\n\n::\n\n    $ genmypy --help\n    Usage: genmypy [-h] {msg,srv,module} ...\n    positional arguments:\n      {msg,srv,module}\n        msg             Generate stub files from .msg files\n        srv             Generate stub files from .srv files\n        module          Generate __init__.pyi from a msg/srv directory\n\n    optional arguments:\n      -h, --help        show this help message and exit\n\nExamples:\n~~~~~~~~~\n\n.. code:: sh\n\n    # Message files\n    $ genmypy msg custom_msgs custom_msgs/msg/Custom.msg\n    $ genmypy msg std_msgs --out-dir out /opt/ros/noetic/share/std_msgs/msg/Header.msg\n    $ genmypy msg sensor_msgs --out-dir out \\\n        -Istd_msgs:/opt/ros/noetic/share/std_msgs/msg \\\n        -Isensor_msgs:/opt/ros/noetic/share/sensor_msgs/msg \\\n        /opt/ros/noetic/share/sensor_msgs/msg/PointCloud2.msg\n\n    # Service files\n    $ genmypy srv custom_msgs custom_msgs/srv/Custom.msg\n    $ genmypy srv nav_msgs --out-dir out \\\n        -Istd_msgs:/opt/ros/noetic/share/std_msgs/msg \\\n        -Isensor_msgs:/opt/ros/noetic/share/sensor_msgs/msg \\\n        /opt/ros/noetic/share/sensor_msgs/srv/SetCameraInfo.srv\n\n    # Module files\n    $ genmypy module custom_msgs/msg\n    $ genmypy module --module-finder py --out out \\\n        /opt/ros/noetic/lib/python2.7/dist-packages/std_msgs/msg/\n\n``genmypy msg`` / ``genmypy srv``:\n\n.. code:: sh\n\n    Usage: genmypy {msg,srv} [-h] [--out-dir OUT_DIR]\n                            [--include-path INCLUDE_PATH]\n                            package files [files ...]\n\n    positional arguments:\n      package               Package name of given files\n      files                 Files to generate stubs\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --out-dir OUT_DIR     Output directory. If the option is unset, each stub\n                            file will be generated in the same directory as each\n                            input.\n      --include-path INCLUDE_PATH, -I INCLUDE_PATH\n                            Include paths for processing given files\n\n``genmypy module``:\n\n.. code:: sh\n\n    Usage: genmypy module [-h] [--out-dir OUT_DIR] package_dir\n\n    Positional arguments:\n      package_dir        Package directory to create __init__.pyi\n\n    Optional arguments:\n      -h, --help         show this help message and exit\n      --out-dir OUT_DIR  Output directory. If the option is unset, __init__.pyi\n                         will be generated in the same directory as package_dir.\n\n\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "A Python stub generator from genmsg specs",
    "version": "0.3.1",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "5ac594f400c1ccd355c3775a375275e3",
                "sha256": "502bb0ab2c838d0d2f2ad07f6fab8b4ba02498ca0e5366011780e1e7c397026e"
            },
            "downloads": -1,
            "filename": "genmypy-0.3.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ac594f400c1ccd355c3775a375275e3",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 22978,
            "upload_time": "2021-05-09T11:47:29",
            "upload_time_iso_8601": "2021-05-09T11:47:29.716226Z",
            "url": "https://files.pythonhosted.org/packages/e8/f2/8432a336d914c8f85f5b5d8261a3a8d7a11b02f7534de45b9bc49512c319/genmypy-0.3.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "d23ab56b5d093f8715c9fc81650ffe72",
                "sha256": "e5d8c1383a1e6433794bcc8fb7816d17967f425550b048c264658d95173e2958"
            },
            "downloads": -1,
            "filename": "genmypy-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d23ab56b5d093f8715c9fc81650ffe72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14022,
            "upload_time": "2021-05-09T11:47:31",
            "upload_time_iso_8601": "2021-05-09T11:47:31.342234Z",
            "url": "https://files.pythonhosted.org/packages/83/1c/f66d7b99b84ce0b67c37aee27ab25a92bdc9a164ec33e7acfba183d2f770/genmypy-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-09 11:47:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "rospypi",
    "error": "Could not fetch GitHub repository",
    "lcname": "genmypy"
}
        
Elapsed time: 0.27691s