{ "info": { "author": "Nion Software", "author_email": "swift@nion.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.6" ], "description": "Nion Utilities\n==============\n\nThe Nion Utils library (used in Nion Swift)\n-------------------------------------------\nNion utility classes.\n\n.. start-badges\n\n.. list-table::\n :stub-columns: 1\n\n * - tests\n - | |linux|\n * - package\n - |version|\n\n\n.. |linux| image:: https://img.shields.io/travis/nion-software/nionutils/master.svg?label=Linux%20build\n :target: https://travis-ci.org/nion-software/nionutils\n :alt: Travis CI build status (Linux)\n\n.. |version| image:: https://img.shields.io/pypi/v/nionutils.svg\n :target: https://pypi.org/project/nionutils/\n :alt: Latest PyPI version\n\n.. end-badges\n\nMore Information\n----------------\n\n- `Changelog `_\n\nIntroduction\n------------\n\nA utility library of useful Python objects.\n\n- Events\n- Observable\n- Bindings, Converters, Models\n- Geometry\n- Persistence\n- Process, Threads\n- Publish and Subscribe\n- Reference Counting\n- Stream\n- Structured Model\n\nThese objects are primarily used within the Nion Python libraries, but\nmay be useful in general usage too.\n\nThis project is funded by Nion Co. as part of the `Nion\nSwift `__ imaging and analysis platform. The\ncode is available under the Apache License, Version 2.0.\n\nRequirements\n------------\n\nRequires Python 3.5 or later.\n\nGetting Help and Contributing\n-----------------------------\n\nIf you find a bug, please file an issue on GitHub. You can also contact\nus directly at swift@nion.com.\n\nThis is primarily a library focused on providing support to higher level\nNion Python libraries. If you are using this in your own project, we\nwill accept bug fixes and minor feature improvements via pull requests.\nFor larger features or additions, please contact us to discuss.\n\nThis library includes some direct tests, but is also tested via other\nNion Python projects. Any contribution will need to pass the entire\nsuite of tests. New contributions should be submitted with new tests.\n\nSummary of Features\n-------------------\n\nEvents\n~~~~~~\n\nEvents can be used by objects to notify other objects when something of\ninterest occurs. The source object \"fires\" the event, optionally passing\nparameters, and the \"listener\" receives a function call. The source\nobject determines when to fire an event. The event can have multiple\nlisteners. The listeners are called synchronously in the order in which\nthey are added, and the source can fire unconditionally, or until a\nlistener returns True or False.\n\n.. code:: python\n\n from nion.utils import Event\n\n class Telescope:\n def __init__(self):\n self.new_planet_detected_event = Event.Event()\n\n def on_external_event(self, coordinates):\n self.new_planet_detected_event.fire(coordinates)\n\n def handle_new_planet(coordinates):\n print(\"New planet coordinates at \" + str(coordinates))\n\n telescope = Telescope()\n listener = telescope.new_planet_detected_event.listen(handle_new_planet)\n\n listener.close() # when finished\n\nObservable\n~~~~~~~~~~\n\nThe Observable based class defines five basic events for watching for\ndirect changes to an object such as a property changing, an object being\nset or cleared, or an item being inserted or removed from a list. The\nobservable is used along with events to implement bindings.\n\n.. code:: python\n\n from nion.utils import Observable\n\n class MyClass(Observable.Observable):\n def __init__(self):\n self.__weight = 1.0\n\n @property\n def weight(self):\n return self.__weight\n\n @weight.setter\n def weight(self, new_weight):\n self.__weight = new_weight\n self.notify_property_changed(\"weight\")\n\n myc = MyClass()\n\n def property_changed(key):\n if key == \"weight\":\n print(\"The weight changed \" + str(myc.weight))\n\n listener = myc.property_changed_event.listen(property_changed)\n\n listener.close() # when finished\n\nBindings, Converters, Models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBindings connect a value in a source object to a value in a target\nobject. Bindings can be one way bindings from source to target, or two\nway bindings from source to target and from target to source. Bindings\ncan bind property values, lists, or an item in a tuple between the\nsource and target. Bindings work using the Observable events and\nsubsequently are implemented via Events.\n\nBindings can optionally make value conversions between the source and\ntarget. For instance, a binding between a float property and a user\ninterface text field will need to convert from float to string and back.\nConverters between value and strings are included for integer, float,\npercentage, check state, and UUID to strings.\n\nGeometry\n~~~~~~~~\n\nClasses for integer and float based points, sizes, and rectangles are\nincluded. Additional geometry routines are also included, for instance:\nline midpoint.\n\nPersistence\n~~~~~~~~~~~\n\nThe PersistentObject based class defines a basic structure for storing\nobjects and their relationship to each other into a persistent storage\ncontext. PersistentObjects can store basic properties, single objects\n(to-one relationship) and lists of objects (to-many relationship).\nSubclasses must strictly notify the PersistentObject of changes to their\npersistent data and follow certain guidelines. Doing so allows the\nobject to be stored persistently and restored from persistent storage.\n\nProperties in the PersistentObject can have validators, converters,\nchange notifications, and more. Items and relationships have change\nnotifications and more.\n\nThe PersistentStorageContext defines an interfaces which manages a\ncollection of PersistentObjects. It must be able to store a simple dict\nstructure for properties, items, and lists.\n\nProcess, Threads\n~~~~~~~~~~~~~~~~\n\nProcess defines classes to facilitate a threaded queue, which executes\nits items serially, and thread set which executes the most recent item\nin the set.\n\nThreadPool defines a threaded dispatcher with the ability to limit\ndispatch frequency and a thread pool with the ability to execute\nexplicitly without threads for testing.\n\nPublish and Subscribe\n~~~~~~~~~~~~~~~~~~~~~\n\nPublish and subscribe implements a basic publish and subscribe\nmechanism. It is should be considered experimental and is not\nrecommended for use.\n\nReference Counting\n~~~~~~~~~~~~~~~~~~\n\nThe ReferenceCounted base class provides an explicitly reference counted\nobject that is unique from regular Python reference counting in that it\nprovides precise control of when the reference is acquired and released.\nThe about\\_to\\_delete method is called when reference count reaches\nzero.\n\nStream\n~~~~~~\n\nThe Stream classes provide a async-based stream of values that can be\ncontrolled using standard reactive operators such as sample, debounce,\nand combine. The stream source is an Event named value\\_stream and the\nsource object must provide both the value\\_stream and a value property.\n\nStructured Model\n~~~~~~~~~~~~~~~~\n\nThe Structured Model classes provide a way to describe a data structure\nwhich can produce a modifiable and observable object to be used as a\nmodel for other utility classes such as binding and events.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nion-software/nionutils", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "nionutils", "package_url": "https://pypi.org/project/nionutils/", "platform": "", "project_url": "https://pypi.org/project/nionutils/", "project_urls": { "Homepage": "https://github.com/nion-software/nionutils" }, "release_url": "https://pypi.org/project/nionutils/0.3.19/", "requires_dist": null, "requires_python": "", "summary": "Nion utility classes.", "version": "0.3.19" }, "last_serial": 5458954, "releases": { "0.3.10": [ { "comment_text": "", "digests": { "md5": "ea3946ef476b2c5c30d51c5451ddc1a9", "sha256": "b45b3d01481a8c9f0292b049c91c4e93200e5a71e1676ba27e7890dda586e9a6" }, "downloads": -1, "filename": "nionutils-0.3.10-py3-none-any.whl", "has_sig": false, "md5_digest": "ea3946ef476b2c5c30d51c5451ddc1a9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 43333, "upload_time": "2018-05-10T15:44:40", "url": "https://files.pythonhosted.org/packages/b6/b6/44199b5f00f2380c336a61f3cf81ebd58819a1f9e3bef10e4d15fd21062c/nionutils-0.3.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80e5ebb4dde41e90ab1d24da894bb863", "sha256": "d6728c2659f66d9fcf99fcb6d0cf11b3e6e3909217b545ea34ede6de2d7659f0" }, "downloads": -1, "filename": "nionutils-0.3.10.tar.gz", "has_sig": false, "md5_digest": "80e5ebb4dde41e90ab1d24da894bb863", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35099, "upload_time": "2018-05-10T15:44:41", "url": "https://files.pythonhosted.org/packages/41/e2/c534e1cea3be03b32ae80a9dd7733c3ab54729b5d50390d58f6cbb278843/nionutils-0.3.10.tar.gz" } ], "0.3.11": [ { "comment_text": "", "digests": { "md5": "0e776e596957b651f64aa497ae8d483b", "sha256": "82335b5d007748a1aa272bb4170bf0772076a6c75beba6b9e674150aa96fc823" }, "downloads": -1, "filename": "nionutils-0.3.11-py3-none-any.whl", "has_sig": false, "md5_digest": "0e776e596957b651f64aa497ae8d483b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 44001, "upload_time": "2018-06-26T00:39:08", "url": "https://files.pythonhosted.org/packages/f2/2e/31d171595dfc1f98041c242aa64adeac13aeed68c201bfa0e0839d58501c/nionutils-0.3.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f3e4caf28fd875a48fff27c58daff35", "sha256": "6a461dd6ee3ef2281a1e131473d117cbd6e7b5e1009bcb0e7465598d0249942b" }, "downloads": -1, "filename": "nionutils-0.3.11.tar.gz", "has_sig": false, "md5_digest": "8f3e4caf28fd875a48fff27c58daff35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35812, "upload_time": "2018-06-26T00:39:09", "url": "https://files.pythonhosted.org/packages/23/34/34160481d2a4917a8eba640444b88bb93562d44675c33656fcbcaefd2c9e/nionutils-0.3.11.tar.gz" } ], "0.3.12": [ { "comment_text": "", "digests": { "md5": "3603362ee9f6ef163a2f0d85bebf0952", "sha256": "dde5ef43513d90c38fe0fb45eb714a94dd0fb23f0ad8460e550a7946fcca80fe" }, "downloads": -1, "filename": "nionutils-0.3.12-py3-none-any.whl", "has_sig": false, "md5_digest": "3603362ee9f6ef163a2f0d85bebf0952", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 44382, "upload_time": "2018-07-23T22:50:07", "url": "https://files.pythonhosted.org/packages/3e/fe/70a490816cb63790189b6fc36dea5572234147f7d73e97c081862b3a2653/nionutils-0.3.12-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a7915d5e091c05252fc9b2c1dcb88b32", "sha256": "f0cf41aa372c710b565bd1fb52ff26e713fd05bfaac8cd6568a57490de9c1a5c" }, "downloads": -1, "filename": "nionutils-0.3.12.tar.gz", "has_sig": false, "md5_digest": "a7915d5e091c05252fc9b2c1dcb88b32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36228, "upload_time": "2018-07-23T22:50:08", "url": "https://files.pythonhosted.org/packages/9a/c7/8684aeee9ec3468bfa9c933c456cae6d0fa54934e9d26b97e7431a3f12f7/nionutils-0.3.12.tar.gz" } ], "0.3.13": [ { "comment_text": "", "digests": { "md5": "0912769fab6d3d8dbfb16bf2abb326f9", "sha256": "c50ba034d9012f89c529134fe749eb6c6e5246f47be109f1e496df9d4fd0a489" }, "downloads": -1, "filename": "nionutils-0.3.13-py3-none-any.whl", "has_sig": false, "md5_digest": "0912769fab6d3d8dbfb16bf2abb326f9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 44434, "upload_time": "2018-09-11T16:15:41", "url": "https://files.pythonhosted.org/packages/fa/70/2aadae34f040a65af8b856ff6c3482d20f6bcb658584a0c3a243791029bb/nionutils-0.3.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bbc913faaa46baf52e928995f0bfbace", "sha256": "6204b3ff8d43e9278a480e5a2fbf3ac7253d6328f32217d48bde17cf53810458" }, "downloads": -1, "filename": "nionutils-0.3.13.tar.gz", "has_sig": false, "md5_digest": "bbc913faaa46baf52e928995f0bfbace", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36289, "upload_time": "2018-09-11T16:15:43", "url": "https://files.pythonhosted.org/packages/4b/49/65ec0d4f04fa6858bb0d143fb290c94610549d7912397f46e7efa4fc5a60/nionutils-0.3.13.tar.gz" } ], "0.3.14": [ { "comment_text": "", "digests": { "md5": "42a1863803d2e74faa64d030e5df5313", "sha256": "b757b1984f6d339ded2fb3fe47386422503d1440c7ec4d65a14ae1cb2989afe7" }, "downloads": -1, "filename": "nionutils-0.3.14-py3-none-any.whl", "has_sig": false, "md5_digest": "42a1863803d2e74faa64d030e5df5313", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 44411, "upload_time": "2018-09-13T15:27:20", "url": "https://files.pythonhosted.org/packages/59/be/7d43092b793003058cae8b1e8f9e5648de11ab0d02a1d725a55486c6c45c/nionutils-0.3.14-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a82ecb1ac0fcb5d72663a59b7488001d", "sha256": "730c3de2f87ea01f272905c85dd407224e0017abd7a9c1658f51fcff13fb9e26" }, "downloads": -1, "filename": "nionutils-0.3.14.tar.gz", "has_sig": false, "md5_digest": "a82ecb1ac0fcb5d72663a59b7488001d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36270, "upload_time": "2018-09-13T15:27:21", "url": "https://files.pythonhosted.org/packages/9a/32/03c02753b365577388349d9e80612b38c6d7e1ac12768bfaf431379b3401/nionutils-0.3.14.tar.gz" } ], "0.3.15": [ { "comment_text": "", "digests": { "md5": "3fb31e501379114eba2e1c25c9911d54", "sha256": "b0a1de0de1ede20ae79976f034394f5929cac38367c3aed21531b0f9f6ffb9ac" }, "downloads": -1, "filename": "nionutils-0.3.15-py3-none-any.whl", "has_sig": false, "md5_digest": "3fb31e501379114eba2e1c25c9911d54", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45858, "upload_time": "2018-11-14T01:32:28", "url": "https://files.pythonhosted.org/packages/24/66/2e5685162e7d09e9f368eb9f9ae402c581f71ed0f1ee914c15433ef31b69/nionutils-0.3.15-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "053686be6938321e04a2e0b0fb962020", "sha256": "ad60e0094929e9c323e6ab89acbfbbf5d178df4eddc0da1a5da4e4bfc1fa3d76" }, "downloads": -1, "filename": "nionutils-0.3.15.tar.gz", "has_sig": false, "md5_digest": "053686be6938321e04a2e0b0fb962020", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39877, "upload_time": "2018-11-14T01:32:30", "url": "https://files.pythonhosted.org/packages/08/c8/51e9310afbbdcd2dbe3fd8953b133c943a3438ed8a09612dc0a0420fb39f/nionutils-0.3.15.tar.gz" } ], "0.3.16": [ { "comment_text": "", "digests": { "md5": "7d3c2d77b8abe638519b91a240580ebe", "sha256": "13e80eb139d720c0621ed9b5544a26ad453a6dbd41b706848dd157519f5fa07e" }, "downloads": -1, "filename": "nionutils-0.3.16-py3-none-any.whl", "has_sig": false, "md5_digest": "7d3c2d77b8abe638519b91a240580ebe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 45861, "upload_time": "2018-12-12T03:56:30", "url": "https://files.pythonhosted.org/packages/9a/33/17f9f9bf321aec49030dc567946a14166b408d1e033b41393d87c51af783/nionutils-0.3.16-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48abb6f0d567457382322fc1a12a2c3f", "sha256": "0395afeb6b5c5f4fedd0eab541c6d3a96871f8963139966cc7558103aa2da9c8" }, "downloads": -1, "filename": "nionutils-0.3.16.tar.gz", "has_sig": false, "md5_digest": "48abb6f0d567457382322fc1a12a2c3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39881, "upload_time": "2018-12-12T03:56:31", "url": "https://files.pythonhosted.org/packages/0a/eb/1cfe0c942fa5d1b0932c0580793dca83a27a16b044bfe276a7269dee3a39/nionutils-0.3.16.tar.gz" } ], "0.3.17": [ { "comment_text": "", "digests": { "md5": "7edadca68b6f9a69cb16496fbe661580", "sha256": "5225ff0b31632cc3f2e15aae6f2deeb723a5d001666e36690ed373ffaa0603fd" }, "downloads": -1, "filename": "nionutils-0.3.17-py3-none-any.whl", "has_sig": false, "md5_digest": "7edadca68b6f9a69cb16496fbe661580", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46248, "upload_time": "2019-02-28T04:50:04", "url": "https://files.pythonhosted.org/packages/55/65/be7cb9e0d2f7a1d86466d5185b18ff220644e26e2494299e5c162adf7ce5/nionutils-0.3.17-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "281734dbaeaeba1180b303b579e0f0ea", "sha256": "88109ea7f8e8c90e568d0bec670a6676bb319de39b55e983b9b7daeef87d5b56" }, "downloads": -1, "filename": "nionutils-0.3.17.tar.gz", "has_sig": false, "md5_digest": "281734dbaeaeba1180b303b579e0f0ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40250, "upload_time": "2019-02-28T04:50:05", "url": "https://files.pythonhosted.org/packages/36/51/50efdd75328b8f6422e45f871c1bddc3dceaabedf9c161d2b9ae02e91a63/nionutils-0.3.17.tar.gz" } ], "0.3.18": [ { "comment_text": "", "digests": { "md5": "5cdf81325689b8e75dde2b96957b0331", "sha256": "d2f2937d7b9f2b1f355405e27c95aab7c9b3c957617392fa1e5ae1aeb17bfd04" }, "downloads": -1, "filename": "nionutils-0.3.18-py3-none-any.whl", "has_sig": false, "md5_digest": "5cdf81325689b8e75dde2b96957b0331", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46348, "upload_time": "2019-03-11T18:02:23", "url": "https://files.pythonhosted.org/packages/c7/11/39c3415371f7b33e1c6d40631db4bfd70baf97d333bd92ab2718d657400b/nionutils-0.3.18-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e40a918785938b83e6e323cfd3eda01e", "sha256": "b6e932f80c5c7ffcb55bec0c0ca7a8e00feede939c60a2ab741a58d3fb83dede" }, "downloads": -1, "filename": "nionutils-0.3.18.tar.gz", "has_sig": false, "md5_digest": "e40a918785938b83e6e323cfd3eda01e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40324, "upload_time": "2019-03-11T18:02:24", "url": "https://files.pythonhosted.org/packages/7c/3b/6fb03903b3d82223808818d20e6d8d63908ec95aced43f05d19afd0f4e5e/nionutils-0.3.18.tar.gz" } ], "0.3.19": [ { "comment_text": "", "digests": { "md5": "5dd0c4d90c33e8bb8e811ccaf87c172f", "sha256": "d57949534f06520170168c8f230817462ac9cc66acc676313ca73c2a11352b3a" }, "downloads": -1, "filename": "nionutils-0.3.19-py3-none-any.whl", "has_sig": false, "md5_digest": "5dd0c4d90c33e8bb8e811ccaf87c172f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46851, "upload_time": "2019-06-27T21:12:52", "url": "https://files.pythonhosted.org/packages/b0/f6/465ba5e82d829da5b8527b0340f0fbf679d99ab550ea47ddd5c6364f22cf/nionutils-0.3.19-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b91f6e7ef6c597f1a06024d0ac0f90ea", "sha256": "67776d87f3d97759d3151e1df5f8af1755e49d5e208330f2fa1adddd23ea0ad6" }, "downloads": -1, "filename": "nionutils-0.3.19.tar.gz", "has_sig": false, "md5_digest": "b91f6e7ef6c597f1a06024d0ac0f90ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37670, "upload_time": "2019-06-27T21:12:54", "url": "https://files.pythonhosted.org/packages/e2/85/97eecf03ae8b4bf7a4f9ab10b0c1094465061f383f9f9f879208efc8b92d/nionutils-0.3.19.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5dd0c4d90c33e8bb8e811ccaf87c172f", "sha256": "d57949534f06520170168c8f230817462ac9cc66acc676313ca73c2a11352b3a" }, "downloads": -1, "filename": "nionutils-0.3.19-py3-none-any.whl", "has_sig": false, "md5_digest": "5dd0c4d90c33e8bb8e811ccaf87c172f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46851, "upload_time": "2019-06-27T21:12:52", "url": "https://files.pythonhosted.org/packages/b0/f6/465ba5e82d829da5b8527b0340f0fbf679d99ab550ea47ddd5c6364f22cf/nionutils-0.3.19-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b91f6e7ef6c597f1a06024d0ac0f90ea", "sha256": "67776d87f3d97759d3151e1df5f8af1755e49d5e208330f2fa1adddd23ea0ad6" }, "downloads": -1, "filename": "nionutils-0.3.19.tar.gz", "has_sig": false, "md5_digest": "b91f6e7ef6c597f1a06024d0ac0f90ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37670, "upload_time": "2019-06-27T21:12:54", "url": "https://files.pythonhosted.org/packages/e2/85/97eecf03ae8b4bf7a4f9ab10b0c1094465061f383f9f9f879208efc8b92d/nionutils-0.3.19.tar.gz" } ] }