p4pillon


Namep4pillon JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryAdd your description here
upload_time2025-09-06 16:54:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseBSD-3-Clause
keywords epics p4p pva pvaccess
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # p4pillon
Extensions to the [p4p](https://epics-base.github.io/p4p/) [Server API](https://epics-base.github.io/p4p/server.html), to aid in creation and managment of pvAccess servers.  

[![p4pillon](https://github.com/ISISNeutronMuon/p4pillon/actions/workflows/build.yaml/badge.svg)](https://github.com/ISISNeutronMuon/p4pillon/actions/workflows/build.yaml)

## Installation
p4pillon may be installed via 
```console
$ pip install p4pillon
```

### Python Version
Requires Python 3.10 or later. These extensions make extensive use of [typing](https://docs.python.org/3/library/typing.html) and other recent Python features.

## Documentation
Documentation intended for developers using the library is available [here](https://isisneutronmuon.github.io/p4pillon/).  

### Extensions
A brief overview of the components of the library.

#### NT Logic
> [!CAUTION]
> This is not an alternative to the Process Database implemented in a traditional EPICS IOC. Although the Normative Type logic is implemented, it does not implement locking. This means that in the case of multiple simultaneous updates it is possible for a PV to become inconsistent. At this time we suggest that the NT Logic code be used for rapid prototyping and systems where consistency/reliability are not critical.

The `SharedNT` class, derived from p4p's `SharedPV` class, automatically implements the logic of Normative Types (at this time NTScalars and NTScalarArrays) using handlers. It is possible, with the `CompositeHandler` class to override this behaviour, including diabling or replacing Normative Type logic.
 
#### CompositeHandler and Rules
p4p only allows a single `Handler` class to be associated with a `SharedPV`. To make it easier to combine or share handlers from multiple sources a `CompositeHandler` class is provided. The supplied `CompositeHandler` is derived from the p4p `Handler`. It also derives from an OrderedDict to store componenent `Handler`s (also standard p4p `Handler`s). The `CompositeHandler` calls component handlers in the specified order, and allows the component `Handler`s to be accessed through the OrderedDict interface.

> [!NOTE]
> `CompositeHandler` is designed to work with the `Handler` class, and is **not** designed to work with the `Handler` decorators.

`Rule`s are component `Handler`s used with the `CompositeHandler` used to implement the NT Logic discussed above. The `Rule` class is derived from the `Handler` class but implements a commonly encountered flow from `put()` (for identification and authorisation), to `put()` (for operations that require comparison between the current state of the PV and its possible future state), and `open()` (for operations that only need consider the possible future state of the PV).

#### PVRecipe and Server
`PVRecipe` is a factory method used to simplify creation of `SharedNT` objects, i.e. PVs that implement Normative Type logic. It may be used in conjunction with the p4pillon `Server` class to simplify management of event loops and PV lifecycle.

#### 
The `config_reader` parses a YAML file in order to construct `SharedNT` PVs which are managed by the p4pillon `Server`. This is the simplest way to create and configure 

## Testing
Install the extra dependencies required for testing using `pip install .[test]` or similar.

To run tests invoke [pytest](https://docs.pytest.org/en/latest/):

```console
$ python -m pytest tests
```
or to run all tests and output a coverage report:
```
$ uv run --extra=test python -m coverage run --source=. -m pytest -x tests
$ uv run --extra=test python -m coverage report
```

### Linting and Formatting
This repository's CI/CD pipeling (using GitHub Actions) checks that source code meets PEP 8, and other more stringent, coding standards. This uses the [ruff](https://docs.astral.sh/ruff/) linter and code formatter. It is included in the `.[test] dependencies (see above) and may be manually invoked:

```console
$ ruff check --fix
$ ruff format
```

## Releases
The release process requires use of the `.[dist]` dependencies, which may be installed with `pip install .[dist]`. A build may then be triggered with `python -m build`. Alternatively, use:

```console
$ uv run --extra=dist python -m build
```

Publication to either PyPi or TestPyPI is performed automatically via CI/CD (i.e. GitHub Actions) and is driven by tags. Any commit intended for package publication must be tagged with a unique tag, and the semantic version must be greater than any existing tag. 
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "p4pillon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Ivan Finch <ivan.finch@stfc.ac.uk>",
    "keywords": "epics, p4p, pva, pvaccess",
    "author": null,
    "author_email": "Ivan Finch <ivan.finch@stfc.ac.uk>, Ajit Kurup <a.kurup@imperial.ac.uk>, Kathryn Baker <k.baker@stfc.ac.uk>, Aqeel AlShafei <aqeel.alshafei@stfc.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/c6/6e/8c6842b64ec0373fec32523810375115eed9b3b4259e364949a7d62095dc/p4pillon-0.1.0.tar.gz",
    "platform": null,
    "description": "# p4pillon\nExtensions to the [p4p](https://epics-base.github.io/p4p/) [Server API](https://epics-base.github.io/p4p/server.html), to aid in creation and managment of pvAccess servers.  \n\n[![p4pillon](https://github.com/ISISNeutronMuon/p4pillon/actions/workflows/build.yaml/badge.svg)](https://github.com/ISISNeutronMuon/p4pillon/actions/workflows/build.yaml)\n\n## Installation\np4pillon may be installed via \n```console\n$ pip install p4pillon\n```\n\n### Python Version\nRequires Python 3.10 or later. These extensions make extensive use of [typing](https://docs.python.org/3/library/typing.html) and other recent Python features.\n\n## Documentation\nDocumentation intended for developers using the library is available [here](https://isisneutronmuon.github.io/p4pillon/).  \n\n### Extensions\nA brief overview of the components of the library.\n\n#### NT Logic\n> [!CAUTION]\n> This is not an alternative to the Process Database implemented in a traditional EPICS IOC. Although the Normative Type logic is implemented, it does not implement locking. This means that in the case of multiple simultaneous updates it is possible for a PV to become inconsistent. At this time we suggest that the NT Logic code be used for rapid prototyping and systems where consistency/reliability are not critical.\n\nThe `SharedNT` class, derived from p4p's `SharedPV` class, automatically implements the logic of Normative Types (at this time NTScalars and NTScalarArrays) using handlers. It is possible, with the `CompositeHandler` class to override this behaviour, including diabling or replacing Normative Type logic.\n \n#### CompositeHandler and Rules\np4p only allows a single `Handler` class to be associated with a `SharedPV`. To make it easier to combine or share handlers from multiple sources a `CompositeHandler` class is provided. The supplied `CompositeHandler` is derived from the p4p `Handler`. It also derives from an OrderedDict to store componenent `Handler`s (also standard p4p `Handler`s). The `CompositeHandler` calls component handlers in the specified order, and allows the component `Handler`s to be accessed through the OrderedDict interface.\n\n> [!NOTE]\n> `CompositeHandler` is designed to work with the `Handler` class, and is **not** designed to work with the `Handler` decorators.\n\n`Rule`s are component `Handler`s used with the `CompositeHandler` used to implement the NT Logic discussed above. The `Rule` class is derived from the `Handler` class but implements a commonly encountered flow from `put()` (for identification and authorisation), to `put()` (for operations that require comparison between the current state of the PV and its possible future state), and `open()` (for operations that only need consider the possible future state of the PV).\n\n#### PVRecipe and Server\n`PVRecipe` is a factory method used to simplify creation of `SharedNT` objects, i.e. PVs that implement Normative Type logic. It may be used in conjunction with the p4pillon `Server` class to simplify management of event loops and PV lifecycle.\n\n#### \nThe `config_reader` parses a YAML file in order to construct `SharedNT` PVs which are managed by the p4pillon `Server`. This is the simplest way to create and configure \n\n## Testing\nInstall the extra dependencies required for testing using `pip install .[test]` or similar.\n\nTo run tests invoke [pytest](https://docs.pytest.org/en/latest/):\n\n```console\n$ python -m pytest tests\n```\nor to run all tests and output a coverage report:\n```\n$ uv run --extra=test python -m coverage run --source=. -m pytest -x tests\n$ uv run --extra=test python -m coverage report\n```\n\n### Linting and Formatting\nThis repository's CI/CD pipeling (using GitHub Actions) checks that source code meets PEP 8, and other more stringent, coding standards. This uses the [ruff](https://docs.astral.sh/ruff/) linter and code formatter. It is included in the `.[test] dependencies (see above) and may be manually invoked:\n\n```console\n$ ruff check --fix\n$ ruff format\n```\n\n## Releases\nThe release process requires use of the `.[dist]` dependencies, which may be installed with `pip install .[dist]`. A build may then be triggered with `python -m build`. Alternatively, use:\n\n```console\n$ uv run --extra=dist python -m build\n```\n\nPublication to either PyPi or TestPyPI is performed automatically via CI/CD (i.e. GitHub Actions) and is driven by tags. Any commit intended for package publication must be tagged with a unique tag, and the semantic version must be greater than any existing tag. ",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Add your description here",
    "version": "0.1.0",
    "project_urls": {
        "Repository": "https://github.com/epics-base/p4p"
    },
    "split_keywords": [
        "epics",
        " p4p",
        " pva",
        " pvaccess"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e9a45b1eb22e248e52f7a48d41a89dfde46e8416f578aa989dcb3883adf04452",
                "md5": "8c7f2976d253f44fa89d9b9d5c49f401",
                "sha256": "0e699d5636bfb372ca9cdf72d47cc7492c0d120864c4e65b122eead59603ff95"
            },
            "downloads": -1,
            "filename": "p4pillon-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c7f2976d253f44fa89d9b9d5c49f401",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 30678,
            "upload_time": "2025-09-06T16:54:20",
            "upload_time_iso_8601": "2025-09-06T16:54:20.400218Z",
            "url": "https://files.pythonhosted.org/packages/e9/a4/5b1eb22e248e52f7a48d41a89dfde46e8416f578aa989dcb3883adf04452/p4pillon-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c66e8c6842b64ec0373fec32523810375115eed9b3b4259e364949a7d62095dc",
                "md5": "c632df8efa6912a983efd68ee95628d5",
                "sha256": "3a17e284af889a7f7f1023637ea572f15d4a54720a1ee364dacfa434290b11af"
            },
            "downloads": -1,
            "filename": "p4pillon-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c632df8efa6912a983efd68ee95628d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 93509,
            "upload_time": "2025-09-06T16:54:22",
            "upload_time_iso_8601": "2025-09-06T16:54:22.179074Z",
            "url": "https://files.pythonhosted.org/packages/c6/6e/8c6842b64ec0373fec32523810375115eed9b3b4259e364949a7d62095dc/p4pillon-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-06 16:54:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "epics-base",
    "github_project": "p4p",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "p4pillon"
}
        
Elapsed time: 1.96579s