minstrel


Nameminstrel JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryInstrumentation hardware orchestration platform.
upload_time2024-01-30 13:17:12
maintainer
docs_urlNone
author
requires_python>=3.11
licenseBSD 3-Clause License Copyright (c) 2024, Michael Czigler Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords instrumentation scpi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # minstrel

An instrumentation hardware orchestration platform.

## Install

### PyPI

Install and update using pip:

```shell
pip install -U minstrel
```

### Repository

When using git, clone the repository and change your 
present working directory.

```shell
git clone http://github.com/mcpcpc/minstrel
cd minstrel/
```

Create and activate a virtual environment.

```shell
python -m venv venv
source venv/bin/activate
```

Install minstrel to the virtual environment.

```shell
pip install -e .
```

## Commands

### db-init

The backend database can be initialized or re-initialized 
with the following command.

```shell
quart --app minstrel init-db
```

### token

In order to prevent unauthorized or accidental backend
database manipulation, some API actions require a *token*
key argument. Token strings can be generated with the
following command.

```shell
quart --app minstrel token
```

The token command also accepts an integer argument that
defines the duration (in seconds) in which the generated
token is valid. The default argument value is `300`.

Note that changing the `SECRET_KEY` variable will
invalidate any previously generated tokens once the
application instance is restarted. 

## Docker Container

Pulling the latest container image from command line.

```shell
docker pull ghcr.io/mcpcpc/minstrel:latest
```

## Deployment

Before deployment, overriding the default `SECRET_KEY`
variable is *strongly* encourage. This can be done by
creating a `conf.py` file and placing it in the
same root as the instance (i.e. typically where the
backend database resides).

```python
SECRET_KEY = “192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf“
```

There are a number of ways to generate a secret key
value. The simplest would be to use the built-in secrets
Python library.

```shell
$ python -c ‘import secrets; print(secrets.token_hex())’
‘192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf’
```

### Quart

Non-production ASGI via quart for development and
debugging.

```shell
quart --debug --app minstrel run
```

### Uvicorn

Production ASGI via uvicorn.

```shell
pip install uvicorn
uvicorn --factory minstrel:create_app
```

## Test

```shell
python3 -m unittest
```

Run with coverage report.

```shell
coverage run -m unittest
coverage report
coverage html  # open htmlcov/index.html in a browser
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "minstrel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "instrumentation,scpi",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/eb/f3/26a4451b3a870dfdb584d6932e591467ad706b0045311dc41bd5815a6a5b/minstrel-0.0.2.tar.gz",
    "platform": null,
    "description": "# minstrel\n\nAn instrumentation hardware orchestration platform.\n\n## Install\n\n### PyPI\n\nInstall and update using pip:\n\n```shell\npip install -U minstrel\n```\n\n### Repository\n\nWhen using git, clone the repository and change your \npresent working directory.\n\n```shell\ngit clone http://github.com/mcpcpc/minstrel\ncd minstrel/\n```\n\nCreate and activate a virtual environment.\n\n```shell\npython -m venv venv\nsource venv/bin/activate\n```\n\nInstall minstrel to the virtual environment.\n\n```shell\npip install -e .\n```\n\n## Commands\n\n### db-init\n\nThe backend database can be initialized or re-initialized \nwith the following command.\n\n```shell\nquart --app minstrel init-db\n```\n\n### token\n\nIn order to prevent unauthorized or accidental backend\ndatabase manipulation, some API actions require a *token*\nkey argument. Token strings can be generated with the\nfollowing command.\n\n```shell\nquart --app minstrel token\n```\n\nThe token command also accepts an integer argument that\ndefines the duration (in seconds) in which the generated\ntoken is valid. The default argument value is `300`.\n\nNote that changing the `SECRET_KEY` variable will\ninvalidate any previously generated tokens once the\napplication instance is restarted. \n\n## Docker Container\n\nPulling the latest container image from command line.\n\n```shell\ndocker pull ghcr.io/mcpcpc/minstrel:latest\n```\n\n## Deployment\n\nBefore deployment, overriding the default `SECRET_KEY`\nvariable is *strongly* encourage. This can be done by\ncreating a `conf.py` file and placing it in the\nsame root as the instance (i.e. typically where the\nbackend database resides).\n\n```python\nSECRET_KEY = \u201c192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf\u201c\n```\n\nThere are a number of ways to generate a secret key\nvalue. The simplest would be to use the built-in secrets\nPython library.\n\n```shell\n$ python -c \u2018import secrets; print(secrets.token_hex())\u2019\n\u2018192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf\u2019\n```\n\n### Quart\n\nNon-production ASGI via quart for development and\ndebugging.\n\n```shell\nquart --debug --app minstrel run\n```\n\n### Uvicorn\n\nProduction ASGI via uvicorn.\n\n```shell\npip install uvicorn\nuvicorn --factory minstrel:create_app\n```\n\n## Test\n\n```shell\npython3 -m unittest\n```\n\nRun with coverage report.\n\n```shell\ncoverage run -m unittest\ncoverage report\ncoverage html  # open htmlcov/index.html in a browser\n```\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2024, Michael Czigler  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Instrumentation hardware orchestration platform.",
    "version": "0.0.2",
    "project_urls": {
        "homepage": "https://github.com/mcpcpc/minstrel",
        "repository": "https://github.com/mcpcpc/minstrel"
    },
    "split_keywords": [
        "instrumentation",
        "scpi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d59cda5e912eacf636d0ea54ffae60cf83a99fc0159621da7b7194d70bf8d343",
                "md5": "6d274290109b537301fd0cb4c16752a9",
                "sha256": "f2852a65305395e0ce255e38f988aca1f266e4c9c3df9ff8dc151be5bb1cec79"
            },
            "downloads": -1,
            "filename": "minstrel-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d274290109b537301fd0cb4c16752a9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 3101941,
            "upload_time": "2024-01-30T13:17:10",
            "upload_time_iso_8601": "2024-01-30T13:17:10.424266Z",
            "url": "https://files.pythonhosted.org/packages/d5/9c/da5e912eacf636d0ea54ffae60cf83a99fc0159621da7b7194d70bf8d343/minstrel-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebf326a4451b3a870dfdb584d6932e591467ad706b0045311dc41bd5815a6a5b",
                "md5": "981a96ad18eda6ea286c78dd13973701",
                "sha256": "d7f4e90b6922b3354281649650d636232ee70513bd3d8b9346740496866740c5"
            },
            "downloads": -1,
            "filename": "minstrel-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "981a96ad18eda6ea286c78dd13973701",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 3097948,
            "upload_time": "2024-01-30T13:17:12",
            "upload_time_iso_8601": "2024-01-30T13:17:12.526468Z",
            "url": "https://files.pythonhosted.org/packages/eb/f3/26a4451b3a870dfdb584d6932e591467ad706b0045311dc41bd5815a6a5b/minstrel-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 13:17:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mcpcpc",
    "github_project": "minstrel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "minstrel"
}
        
Elapsed time: 0.17476s