door


Namedoor JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/blueskysolarracing/door
SummaryA comprehensive python library for synchronization proxies
upload_time2024-06-19 20:50:12
maintainerNone
docs_urlNone
authorBlue Sky Solar Racing
requires_python>=3.11
licenseMIT
keywords python synchronization
VCS
bugtrack_url
requirements build coverage flake8 interrogate mypy Sphinx twine
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====
Door
====

Door is a comprehensive python library for synchronization proxies. Door's
reliability has been established through static type checking, extensive
doctests, and unit tests, achieving 93% code coverage.


Features
--------

- Share objects across processes without queues or pipes.
- Synchronization proxies to enforce sound synchronous data access.

  - Supported scenarios:
  
    - Threading;
    - Multiprocessing;
    - Asynchronous programming.

- Shared lock (Readers-writer lock) implementations.
- Shared condition variable (Readers-writer condition variables)
  implementations.

Installation
------------

.. code-block:: bash

   pip install door

Usage
-----

Below shows a sample usage of Door.

.. code-block:: pycon

   >>> from dataclasses import dataclass
   >>> from multiprocessing import Process
   >>> from door.multiprocessing2 import Handle, SAcquirableDoor
   >>> @dataclass
   ... class Resource:
   ...     key: str = 'value'
   ... 
   >>> handle = Handle(Resource())
   >>> handle.get()
   Resource(key='value')
   >>> door = SAcquirableDoor(handle)
   >>> def func(door):
   ...     with door.write() as proxy:
   ...         proxy.key = 'VALUE'
   ... 
   >>> process = Process(target=func, args=(door,))
   >>> process.start()
   >>> process.join()
   >>> handle.get()
   Resource(key='VALUE')
   >>> handle.unlink()

Testing and Validation
----------------------

Door has extensive test coverage, passes mypy static type checking with
strict parameter, and has been validated through extensive use in real-life
scenarios.

Contributing
------------

Contributions are welcome! Please read our Contributing Guide for more
information.

License
-------

Door is distributed under the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/blueskysolarracing/door",
    "name": "door",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "python, synchronization",
    "author": "Blue Sky Solar Racing",
    "author_email": "blueskysolar@studentorg.utoronto.ca",
    "download_url": "https://files.pythonhosted.org/packages/a0/54/c3e691de7aaee958d080ae04ed766d606917396bcd7facd64b248b25c4ed/door-0.0.4.tar.gz",
    "platform": null,
    "description": "====\nDoor\n====\n\nDoor is a comprehensive python library for synchronization proxies. Door's\nreliability has been established through static type checking, extensive\ndoctests, and unit tests, achieving 93% code coverage.\n\n\nFeatures\n--------\n\n- Share objects across processes without queues or pipes.\n- Synchronization proxies to enforce sound synchronous data access.\n\n  - Supported scenarios:\n  \n    - Threading;\n    - Multiprocessing;\n    - Asynchronous programming.\n\n- Shared lock (Readers-writer lock) implementations.\n- Shared condition variable (Readers-writer condition variables)\n  implementations.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n   pip install door\n\nUsage\n-----\n\nBelow shows a sample usage of Door.\n\n.. code-block:: pycon\n\n   >>> from dataclasses import dataclass\n   >>> from multiprocessing import Process\n   >>> from door.multiprocessing2 import Handle, SAcquirableDoor\n   >>> @dataclass\n   ... class Resource:\n   ...     key: str = 'value'\n   ... \n   >>> handle = Handle(Resource())\n   >>> handle.get()\n   Resource(key='value')\n   >>> door = SAcquirableDoor(handle)\n   >>> def func(door):\n   ...     with door.write() as proxy:\n   ...         proxy.key = 'VALUE'\n   ... \n   >>> process = Process(target=func, args=(door,))\n   >>> process.start()\n   >>> process.join()\n   >>> handle.get()\n   Resource(key='VALUE')\n   >>> handle.unlink()\n\nTesting and Validation\n----------------------\n\nDoor has extensive test coverage, passes mypy static type checking with\nstrict parameter, and has been validated through extensive use in real-life\nscenarios.\n\nContributing\n------------\n\nContributions are welcome! Please read our Contributing Guide for more\ninformation.\n\nLicense\n-------\n\nDoor is distributed under the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive python library for synchronization proxies",
    "version": "0.0.4",
    "project_urls": {
        "Documentation": "https://door.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/blueskysolarracing/door",
        "Source": "https://github.com/blueskysolarracing/door",
        "Tracker": "https://github.com/blueskysolarracing/door/issues"
    },
    "split_keywords": [
        "python",
        " synchronization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8074fa43943862c23c808cbe3f30f7ba3a2d15194c8e6de622476e037067642e",
                "md5": "e69a903c4117cb807a7adda0de084aa6",
                "sha256": "e541e89350011138ca0ecd8def5f19d91bcecf1052f30c5c9eef2114bb9fc6e5"
            },
            "downloads": -1,
            "filename": "door-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e69a903c4117cb807a7adda0de084aa6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 15964,
            "upload_time": "2024-06-19T20:50:10",
            "upload_time_iso_8601": "2024-06-19T20:50:10.568697Z",
            "url": "https://files.pythonhosted.org/packages/80/74/fa43943862c23c808cbe3f30f7ba3a2d15194c8e6de622476e037067642e/door-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a054c3e691de7aaee958d080ae04ed766d606917396bcd7facd64b248b25c4ed",
                "md5": "12e53a06e09edc9be24d96d5dfffe8c3",
                "sha256": "af3d88e48f48d0dcfb6be3bf15444be3a389273f2922e13e951e8689e73207b0"
            },
            "downloads": -1,
            "filename": "door-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "12e53a06e09edc9be24d96d5dfffe8c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 11972,
            "upload_time": "2024-06-19T20:50:12",
            "upload_time_iso_8601": "2024-06-19T20:50:12.582809Z",
            "url": "https://files.pythonhosted.org/packages/a0/54/c3e691de7aaee958d080ae04ed766d606917396bcd7facd64b248b25c4ed/door-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-19 20:50:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "blueskysolarracing",
    "github_project": "door",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "build",
            "specs": [
                [
                    "~=",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "~=",
                    "7.3.1"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    "~=",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "interrogate",
            "specs": [
                [
                    "~=",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "~=",
                    "1.5.1"
                ]
            ]
        },
        {
            "name": "Sphinx",
            "specs": [
                [
                    "~=",
                    "7.2.6"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "~=",
                    "4.0.2"
                ]
            ]
        }
    ],
    "lcname": "door"
}
        
Elapsed time: 0.30018s