{ "info": { "author": "Yasin Guenduez, Paul Rogister", "author_email": "yasin.guenduez@ensenso.com, paul.rogister@isys-vision.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "# NxLib Python Interface [![Build Status](https://travis-ci.org/ensenso/nxlib-python-interface.svg?branch=master)](https://travis-ci.org/ensenso/nxlib-python-interface)\n\nThis package is the Python interface from the [Ensenso](https://www.ensenso.com/) GmbH, to access functionalities of the NxLib via Python. With the Interface you can access your installed version of the NxLib from the [EnsensoSDK](https://www.ensenso.com/support/sdk-download/?lang=en) and use it with Python. Beware this project is currently in beta phase and some functionalities do not work yet.\n\n## Prerequisites\n\nIn Order to use this package you will need the following Prerequisites installed:\n * [EnsensoSDK](https://www.ensenso.com/support/sdk-download/?lang=en) - Official SDK of the [Ensenso](https://www.ensenso.com/) Group for developing software with stereo 3D cameras for industrial applications. Versions >= 2.3. are recommended.\n * [Python](https://www.python.org/downloads/) - Version > 3.5. is required.\n * [Pip](https://pip.pypa.io/en/stable/installing/) - A Python package manager. Version > 9.0.1 is required.\n\nThe following packages should be installed default with python > 3.5., that are:\n * [Numpy](https://numpy.org/) - A package for scientific computing with Python (tested and developed with 1.17.2).\n * [Ctypes](https://docs.python.org/3.5/library/ctypes.html) - A foreign function library for Python, that allows calling functions in DLLs or shared libraries.\n\n\nThis package is only needed, if you want to run the tests in the ./tests folder:\n * [Pytest](https://docs.pytest.org/en/latest/) - A Python testing framework.\n\n## Installing\n\nThere are two ways of installing the package. Either directly from source, or via pip repositories.\n\n#### Installing with Pip Repository\nIf you do not need to do any modifications in the installed packet space and only want to use the package as is, we recommend you to install the package with pip. Pip will handle all dependencies of the package and will download the latest package version from here.\n\nGlobal installation (does need privileged rights).\n```\npip install ensenso_nxlib\n```\nLocal installation.\n```\npip install --user ensenso_nxlib\n```\n\n#### Installing from Source\nIf you like to install from source, e.g. to make local changes of the installed package on your system, you will first have to clone the repository\n```\ngit clone https://github.com/ensenso/nxlib-python-interface.git\n```\nand install it from the root of the cloned repository (where the [setup.py](setup.py) - file is located).\n```\ncd nxlib-python-interface\npip install .\n```\n\nIf you like to do changes to your local installation (development version), install it with\n```\npip install -e .[dev]\n```\nYou will need extra packages defined under [setup.py](setup.py) in the extra_require dictionary, which pip will install for you.\n\n\n## Overview\n\nThe Python Interface ensenso_nxlib consists of modules which implement the NxLib classes (NxLibItem, NxLibCommand, NxLibException) and modules which wrap the global NxLib-Functions.\n\n### Global Functions and Constants\n * **api** - The module for accessing global functions.\n * **constants** - A module, where all constants are defined. When this module is imported, it **updates itself** with the constants defined in the corresponding installed / loaded DLL (Windows) or shared library (Linux).\n * **helper** - Helper functions that are used within other modules of this package (can be ignored).\n\n### Classes\n * **item** - The module for the NxLibItem class.\n * **command** - The module for the NxLibCommand class.\n * **exception** - The module for NxLibException class.\n\n### How to import the modules\nThe constants or api module should be imported like this\n```python\nimport ensenso_nxlib.api as api\nfrom ensenso_nxlib.constants import *\n```\nUsually import * should be avoided. In this case however, it is unlikely that the constants defined here have the same name as other variables in your projects. Otherwise you will have to access them within a namespace like the following\n```python\nimport ensenso_nxlib.constants as consts\n```\nand call the corresponding constants with the defined namespace\n```python\nconsts.ITM_NXLIB_CONSTANT\n```\n\nClass modules can be easily imported like the following\n```python\nfrom ensenso_nxlib import NxLibItem, NxLibCommand, NxLibException\n```\n\n## Differences to other Language APIs from EnsensoSDK\n\nThe Python API differs in naming convention and access of global/static functions, which are described below.\n\n### Naming\nWe try to make the Python API feel like the ones in C or C++, described in the EnsensoSDK [manual](https://www.ensenso.com/manual/index.html?nxlib_api.htm).\nThe main difference lies in between the naming convention. In Python we use the naming convention after [pep8](https://www.python.org/dev/peps/pep-0008/) and in C, C#, C++ we use the [camelCase](https://en.wikipedia.org/wiki/Camel_case)-convention.\n\nThe difference is shown in the following table.\n\n| Type | Python | C/C++ |\n| --------- | ------------------ | --------------- |\n| Constants | ITM_CONSTANT | itmConstant |\n| Variables | this_is_a_variable | thisIsAVariable |\n| Functions | a_function() | aFunction() |\n\n### Static/Global Function Access\n\nIf you would like to use C-Api-like functions (associated without any objects) within Python, you will have to call them with an object.\nAs an example the code in C++\n```cpp\n#include \nnxLibInitialize();\n```\nwill be the following in Python.\n```python\nimport ensenso_nxlib.api as api\napi.initialize()\n```\nWe also stripped away the nxLib prefix of these static C++ or C functions, because the corresponding functions in Python are associated with an object.\n\nOf course, you could also do the following:\n```python\nfrom ensenso_nxlib.api import *\ninitialize()\n```\nThat enables you to call the function within the global namespace in Python. This, however, is not recommended. It could overwrite other functions that have the same name in your program (which is likely for the name e.g. initialize)\n\n\nOther than that, you can use the Python API like the other APIs described in the [manual](https://www.ensenso.com/manual/). We also encourage you to do the examples (below) first.\n\n\n## Examples\n\nSome examples are provided in the [examples](./examples) subfolder of this project. \nIf you like to execute them, clone this repository and execute the individual examples in that subfolder.\nFor further information see the [README.md](examples/README.md) within the examples subfolder of this project.\n\n## Running Tests\n\nIf you would like to run tests, go to the root of the project folder (where the setup.py is located) and execute the following:\n```\npython3 setup.py test\n```\nThis will run all tests, defined in the ./tests folder, with pytest. All functions that start with test_* or end with *_test ( * denotes a [wildcard](https://en.wikipedia.org/wiki/Wildcard_character)), will be executed.\n\nIf you want to execute a sole test, you will have to define it in its own *.py file and run it with\n```\npython3 sole_test.py\n```\n\n## Versioning\n\nFor released versions, see the [tags on this repository](https://github.com/ensenso/nxlib-python-interface/tags). We use Major.Minor version numbers.\nSometimes there are also post releases. Post released means that the source code has not been changed, but the documentation, for example, has been changed.\n\n## Authors\n\n* **[Yasin Guenduez](mailto:yasin.guenduez@ensenso.com)** - *Ensenso GmbH - Maintenance and further development*\n* **[Paul Rogister](mailto:paul.rogister@isys-vision.de)** - *isys vision GmbH - Initial work*\n\n## Licence\n\nThis project is licensed under the MIT Licence - see the [LICENSE.md](LICENSE.md) file for details", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ensenso/nxlib-python-interface.git", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ensenso-nxlib", "package_url": "https://pypi.org/project/ensenso-nxlib/", "platform": "", "project_url": "https://pypi.org/project/ensenso-nxlib/", "project_urls": { "Homepage": "https://github.com/ensenso/nxlib-python-interface.git" }, "release_url": "https://pypi.org/project/ensenso-nxlib/0.4/", "requires_dist": null, "requires_python": ">3.5.0", "summary": "Python interface to interact with the Ensenso NxLib", "version": "0.4", "yanked": false, "yanked_reason": null }, "last_serial": 12221578, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "de75873a0f3f225dfed2fa879a8aec4c", "sha256": "806247791b4fa39fda707467e1892c139bd85c99ad62fbc7cfacf2a2cef5dfd5" }, "downloads": -1, "filename": "ensenso_nxlib-0.1.tar.gz", "has_sig": false, "md5_digest": "de75873a0f3f225dfed2fa879a8aec4c", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 18986, "upload_time": "2019-10-22T11:55:48", "upload_time_iso_8601": "2019-10-22T11:55:48.178787Z", "url": "https://files.pythonhosted.org/packages/c8/6e/c3d72df01373059a313336a847b474ca476e971de6a1316d9f5d20be0068/ensenso_nxlib-0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.post1": [ { "comment_text": "", "digests": { "md5": "8458997ba7f6d908f8a8cbb15608a9d5", "sha256": "73f500b2be57c229a1015b26805c2b363ed9cc3bcf87ef49bc25869973448758" }, "downloads": -1, "filename": "ensenso_nxlib-0.1.post1.tar.gz", "has_sig": false, "md5_digest": "8458997ba7f6d908f8a8cbb15608a9d5", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 18952, "upload_time": "2019-10-22T12:17:59", "upload_time_iso_8601": "2019-10-22T12:17:59.029892Z", "url": "https://files.pythonhosted.org/packages/e7/cc/70de97e16c2a088d70e485fa6cc1b630b2ff85fa9ce504580daa1a8efbbb/ensenso_nxlib-0.1.post1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8ec5155662f27059b0c142200a52d1c9", "sha256": "5d9768c186b46d5cb4aa4ef4abc121726aed5a554d73af4f3a8fc13cae10c926" }, "downloads": -1, "filename": "ensenso_nxlib-0.2.tar.gz", "has_sig": false, "md5_digest": "8ec5155662f27059b0c142200a52d1c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 19125, "upload_time": "2019-10-28T10:31:34", "upload_time_iso_8601": "2019-10-28T10:31:34.577315Z", "url": "https://files.pythonhosted.org/packages/59/f0/a80522e49478cbeb7dc7b96e73b86d5558a616783e62fdc14a0a2e51b6d8/ensenso_nxlib-0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3815280b63cc92d53b070cf49bebfa97", "sha256": "62063d58e8c9d244e31b572f2ab128588da83ff2bca9aa0a191c7701c4053e15" }, "downloads": -1, "filename": "ensenso_nxlib-0.3.tar.gz", "has_sig": false, "md5_digest": "3815280b63cc92d53b070cf49bebfa97", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 19189, "upload_time": "2020-01-28T10:34:34", "upload_time_iso_8601": "2020-01-28T10:34:34.395193Z", "url": "https://files.pythonhosted.org/packages/df/99/8b1c13cc83245f3899155fe652ff5b817a7fd323ee094589f1b17ee477e1/ensenso_nxlib-0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9d6cb866d297248c26b24b396ebf1fda", "sha256": "61be29aea643e7cebdfbe94de84c9d61c260443d22e4842434c6f9f416567333" }, "downloads": -1, "filename": "ensenso_nxlib-0.4.tar.gz", "has_sig": false, "md5_digest": "9d6cb866d297248c26b24b396ebf1fda", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 22482, "upload_time": "2020-07-22T14:22:53", "upload_time_iso_8601": "2020-07-22T14:22:53.256815Z", "url": "https://files.pythonhosted.org/packages/a1/71/1eee7dc240a43446fd32574ea216331b87ac9b54c8f77f6b2875d7d37c63/ensenso_nxlib-0.4.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9d6cb866d297248c26b24b396ebf1fda", "sha256": "61be29aea643e7cebdfbe94de84c9d61c260443d22e4842434c6f9f416567333" }, "downloads": -1, "filename": "ensenso_nxlib-0.4.tar.gz", "has_sig": false, "md5_digest": "9d6cb866d297248c26b24b396ebf1fda", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.5.0", "size": 22482, "upload_time": "2020-07-22T14:22:53", "upload_time_iso_8601": "2020-07-22T14:22:53.256815Z", "url": "https://files.pythonhosted.org/packages/a1/71/1eee7dc240a43446fd32574ea216331b87ac9b54c8f77f6b2875d7d37c63/ensenso_nxlib-0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }