myminapp


Namemyminapp JSON
Version 0.9.3 PyPI version JSON
download
home_page
SummaryA minimal but complete Python example application
upload_time2024-02-08 13:44:37
maintainer
docs_urlNone
authorhttps://github.com/berryunit
requires_python>=3.10
licensemyminapp Copyright (c) 2024 - berryunit MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords education learning practise example examples sample samples smarthome smart home homeautomation home automation diy modbus fritz bosch shelly opendtu raspberry relay
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # My Minimal Application (myminapp)

![image (see repository)](./myminapp/doc/image/logo.png "./myminapp/doc/image/logo.png") 

- Documentation: /doc/myminapp-manual-de.pdf, /doc/myminapp-manual-en.pdf
- License: MIT
- Author: berryunit

'myminapp' is a minimal but complete Python application that exemplifies how small DIY home projects can be programmed with little effort.

It offers the following features out-of-the-box:

- Complete, transparent application structure with commands, logging and data storage
- Simple usage via Python shell and integration into scripts and programs
- Application server and web frontend for HTTP(S) requests
- Time-controlled automation
- Multilingual message texts
- Various commands that can be directly useful or serve as patterns
- Easy expandability for the implementation of individual tasks

A computer running Python version 3.10 or higher is required. A USB SSD is recommended for SBCs such as Raspberry Pi, as SD cards are not suitable for continuous operation.

To install the application and execute the 'helloworld' command in different ways, proceed as follows.

## Step 1 - Install myminapp

Download the release file 'myminapp-*version*.zip' from https://github.com/berryunit/myminapp and unzip it into a directory with read and write access.

*Note: As an example application, myminapp should be unpacked from the release file into a user directory. This is the easiest way to access the source code. Alternatively, the installation can be done via pip.*

In the following, it is assumed that the application directory 'myminapp' contained in the release file was moved to '/home/u1/' by the user 'u1'. It is also assumed that Python version 3 can be called up on the system with 'python3'.

## Step 2 - Execute command 'helloworld' via Python shell

### 2.1 Start the Python shell

In the 'home/u1' directory (above myminapp), enter:

	python3

### 2.2 Within the Python shell, enter:

    from myminapp.app import App
    app1 = App(1)
    app1.perform_command({'cmd':'helloworld', 'value':'Hello World'})
    app1.close()

### 2.3 Exit the Python shell with:

	exit()

## Step 3 - Execute requests via application server

Start the application server in the 'home/u1' directory (above myminapp). Enter:

	python3 -m myminapp.appserver
 
### 3.1 - Execute command 'helloworld' via CURL

Open another terminal and enter the following:

	curl --get --data-urlencode '{"cmd": "helloworld", "value": "Hello World"}' http://localhost:8081

### 3.2 - Execute command 'helloworld' via browser URL line

Open a browser and enter it in the URL line:

	http://localhost:8081/{"cmd": "helloworld", "value": "Hello World"}

### 3.3 - Execute 'helloworld' command via web frontend

#### Open a browser and enter the URL in the URL line:

<div style="display: inline">http://localhost:8081/app.html</div>

#### Select the command 'helloworld' and press the command execution button.

Example image (Mozilla Firefox, myminapp language setting 'de'):

![image (see repository)](./myminapp/doc/image/web.png "./myminapp/doc/image/web.png")

Terminate the application server by entering the following in the terminal:

	Ctrl+C

## Step 4 - Execute command 'helloworld' via test class

In the 'home/u1' directory (above myminapp), enter:

	python3 -m myminapp.test.command.test_helloworld

**All further information can be found in the manual:**

- /doc/myminapp-manual-de.pdf
- /doc/myminapp-manual-en.pdf

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "myminapp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "education,learning,practise,example,examples,sample,samples,smarthome,smart home,homeautomation,home automation,diy,modbus,fritz,bosch,shelly,opendtu,raspberry,relay",
    "author": "https://github.com/berryunit",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a8/d1/77cb1c511c60983e4ed3dbf33b9e9505f8fa5597c83b8160889870b6a893/myminapp-0.9.3.tar.gz",
    "platform": null,
    "description": "# My Minimal Application (myminapp)\n\n![image (see repository)](./myminapp/doc/image/logo.png \"./myminapp/doc/image/logo.png\") \n\n- Documentation: /doc/myminapp-manual-de.pdf, /doc/myminapp-manual-en.pdf\n- License: MIT\n- Author: berryunit\n\n'myminapp' is a minimal but complete Python application that exemplifies how small DIY home projects can be programmed with little effort.\n\nIt offers the following features out-of-the-box:\n\n- Complete, transparent application structure with commands, logging and data storage\n- Simple usage via Python shell and integration into scripts and programs\n- Application server and web frontend for HTTP(S) requests\n- Time-controlled automation\n- Multilingual message texts\n- Various commands that can be directly useful or serve as patterns\n- Easy expandability for the implementation of individual tasks\n\nA computer running Python version 3.10 or higher is required. A USB SSD is recommended for SBCs such as Raspberry Pi, as SD cards are not suitable for continuous operation.\n\nTo install the application and execute the 'helloworld' command in different ways, proceed as follows.\n\n## Step 1 - Install myminapp\n\nDownload the release file 'myminapp-*version*.zip' from https://github.com/berryunit/myminapp and unzip it into a directory with read and write access.\n\n*Note: As an example application, myminapp should be unpacked from the release file into a user directory. This is the easiest way to access the source code. Alternatively, the installation can be done via pip.*\n\nIn the following, it is assumed that the application directory 'myminapp' contained in the release file was moved to '/home/u1/' by the user 'u1'. It is also assumed that Python version 3 can be called up on the system with 'python3'.\n\n## Step 2 - Execute command 'helloworld' via Python shell\n\n### 2.1 Start the Python shell\n\nIn the 'home/u1' directory (above myminapp), enter:\n\n\tpython3\n\n### 2.2 Within the Python shell, enter:\n\n    from myminapp.app import App\n    app1 = App(1)\n    app1.perform_command({'cmd':'helloworld', 'value':'Hello World'})\n    app1.close()\n\n### 2.3 Exit the Python shell with:\n\n\texit()\n\n## Step 3 - Execute requests via application server\n\nStart the application server in the 'home/u1' directory (above myminapp). Enter:\n\n\tpython3 -m myminapp.appserver\n\u2003\n### 3.1 - Execute command 'helloworld' via CURL\n\nOpen another terminal and enter the following:\n\n\tcurl --get --data-urlencode '{\"cmd\": \"helloworld\", \"value\": \"Hello World\"}' http://localhost:8081\n\n### 3.2 - Execute command 'helloworld' via browser URL line\n\nOpen a browser and enter it in the URL line:\n\n\thttp://localhost:8081/{\"cmd\": \"helloworld\", \"value\": \"Hello World\"}\n\n### 3.3 - Execute 'helloworld' command via web frontend\n\n#### Open a browser and enter the URL in the URL line:\n\n<div style=\"display: inline\">http://localhost:8081/app.html</div>\n\n#### Select the command 'helloworld' and press the command execution button.\n\nExample image (Mozilla Firefox, myminapp language setting 'de'):\n\n![image (see repository)](./myminapp/doc/image/web.png \"./myminapp/doc/image/web.png\")\n\nTerminate the application server by entering the following in the terminal:\n\n\tCtrl+C\n\n## Step 4 - Execute command 'helloworld' via test class\n\nIn the 'home/u1' directory (above myminapp), enter:\n\n\tpython3 -m myminapp.test.command.test_helloworld\n\n**All further information can be found in the manual:**\n\n- /doc/myminapp-manual-de.pdf\n- /doc/myminapp-manual-en.pdf\n",
    "bugtrack_url": null,
    "license": "myminapp  Copyright (c) 2024 - berryunit  MIT License  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A minimal but complete Python example application",
    "version": "0.9.3",
    "project_urls": {
        "repository": "https://github.com/berryunit/myminapp"
    },
    "split_keywords": [
        "education",
        "learning",
        "practise",
        "example",
        "examples",
        "sample",
        "samples",
        "smarthome",
        "smart home",
        "homeautomation",
        "home automation",
        "diy",
        "modbus",
        "fritz",
        "bosch",
        "shelly",
        "opendtu",
        "raspberry",
        "relay"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20fa0eeebc1a81a1ba6aaf68dfbc6f97e50fd0e19aada1b1502f772c855f15ee",
                "md5": "940b4c9ad27de0926695d3ccec325812",
                "sha256": "d9456a02dad2f88e659f69fb550c8d9e02bdfde56343e68f8bbf09c331c84643"
            },
            "downloads": -1,
            "filename": "myminapp-0.9.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "940b4c9ad27de0926695d3ccec325812",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 2996307,
            "upload_time": "2024-02-08T13:44:34",
            "upload_time_iso_8601": "2024-02-08T13:44:34.255907Z",
            "url": "https://files.pythonhosted.org/packages/20/fa/0eeebc1a81a1ba6aaf68dfbc6f97e50fd0e19aada1b1502f772c855f15ee/myminapp-0.9.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8d177cb1c511c60983e4ed3dbf33b9e9505f8fa5597c83b8160889870b6a893",
                "md5": "94ff10741f6e816e957cc9b0db1ed2ab",
                "sha256": "0d4a61b96d0cc1dace8788cf5653660606892e6a2b18eac289d3a1d004daff74"
            },
            "downloads": -1,
            "filename": "myminapp-0.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "94ff10741f6e816e957cc9b0db1ed2ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 2947382,
            "upload_time": "2024-02-08T13:44:37",
            "upload_time_iso_8601": "2024-02-08T13:44:37.160713Z",
            "url": "https://files.pythonhosted.org/packages/a8/d1/77cb1c511c60983e4ed3dbf33b9e9505f8fa5597c83b8160889870b6a893/myminapp-0.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-08 13:44:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "berryunit",
    "github_project": "myminapp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "myminapp"
}
        
Elapsed time: 0.20257s