Name | masterpiece JSON |
Version |
0.1.5
JSON |
| download |
home_page | None |
Summary | Masterpiece framework |
upload_time | 2024-12-08 07:17:04 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License =========== Copyright (c) 2024, Juha Meskanen 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 |
keywords |
object-oriented
plugin
framework
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Masterpiece™ (**Development Status 2 - Pre-Alpha**)
====================================================
Try to be Nice
--------------
Welcome to **Masterpiece™** - Quite a Piece of Work!
Masterpiece™ is a **Python framework** designed for creating modular, scalable, plugin-aware, multi-threaded, and
object-oriented applications with a hierarchical structure.
The name 'Masterpiece' was chosen to reflect a commitment to fine-grained modular design, with a touch of humor.
Goals
-----
Have fun while learning the Python ecosystem! The ultimate enjoyment, with a sprinkling of practicality, will be
achieved by cranking the Fun-O-Meter™ up to 11. Coding should feel like a rollercoaster ride—minus the screaming
and the long lines.
* **Pythonic Purity:**: Designed with strict adherence to Python conventions, ensuring idiomatic, readable, and maintainable code.
* **First-Time Excellence**: A framework that's reliable, correct, and efficient from the start,
and fun—because what’s a framework without a little joy?
* **Completeness**: A minimal yet robust API providing developers with total control over everything.
* **Productivity**: Reusable code to achieve maximum functionality with a minimal amount of code (read: money),
and productivity increaseing with the size of the project.
If you appreciate these design concepts, look no further; you've come to the right place!
Project Status and Current State
--------------------------------
Here’s what is currently available:
* **Bug-Free Status**: Absolutely bug-free — just kidding! There are no known bugs remaining, as far as I can tell.
* **Wiki:** First Wiki pages under construction `Masterpiece Wiki <https://gitlab.com/juham/masterpiece/-/wikis/home>`_
* **Tutorial**: First tutorial `tutorial <docs/source/tutorial.rst>`_ to help you to get started with writing masterpieces.
* **Package Infrastructure**: The basic Python package setup is finalized and configured with `pyproject.toml`.
* **Classes**: The existing classes have been finalized.
* **Example Application**: The example application `examples/myhome.py` prints out its instance structure when run.
Despite its simplicity, it demonstrates the structure of a typical scalable and fully configurable software.
* **Plugin Projects**: Several plugin projects, e.g. `masterpiece_plugin` that plugs in a "Hello World" greeting to
`myhome.py`, demonstrating a minimal yet fully functional plugin.
What is currently not there yet:
* **Threads:** This will be the focus of the next milestone. While multi-threading in Python might make some
developers raise an eyebrow due to the well-known Global Interpreter Lock (GIL), I trust the Python community
will continue to address these concerns.
* **MQTT:**: This will also be a priority for the next milestone. The goal is for MasterPiece objects to
communicate seamlessly with each other using the MQTT protocol, enabling efficient message passing in
distributed environments.
* **User Interface:**: Instead of reinventing the wheel, Grafana will be the first choice for visualization
and user interaction. Grafana’s powerful and flexible interface will streamline the development process while
providing users with a robust, ready-made solution.
Projects
--------
Masterpiece comes in four Python projects:
1. **Masterpiece (core framework)**:
This is the core framework for building plugin-aware, multi-threaded applications. It includes a simple yet
fully functional application to help you get started and serves as a plugin-aware reference application
that can be scaled up to any size.
2. **Masterpiece Plugin (plugin example)**:
This is a basic plugin example that demonstrates how to create third-party plugins for applications built
using Masterpiece. It’s as simple as saying **"Hello, World!"**, literally.
3. **Masterpiece XML Format plugin:**:
This is a complete plugin example that demonstrates how to add new serialization format to
Masterpiece.
4. **Masterpiece Yaml Format plugin:**:
Another format plugin. Adds Yaml support to Masterpiece.
**Note**: This project contains only the core framework. The plugins are provided as a separate projects:
* `masterpiece_plugin <https://gitlab.com/juham/masterpiece_plugin>`_ .
* `masterpiece_xmlformat <https://gitlab.com/juham/masterpiece_xmlformat>`_.
* `masterpiece_yamlformat <https://gitlab.com/juham/masterpiece_yamlformat>`_.
Installing Masterpiece
----------------------
**Step 1**: Install Masterpiece and run the example application
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To install the core framework:
.. code-block:: bash
pip install masterpiece
Then, navigate to the example folder and run the application:
.. code-block:: bash
python examples/myhome.py
The application will print out its instance hierarchy. This is a simple example application to demonstrate the
basic structure of any multi-threaded, plugin-based, scalable MasterPiece applications.
**Example output**:
.. code-block:: text
home
├─ grid
├─ downstairs
│ └─ kitchen
│ ├─ oven
│ └─ fridge
└─ garage
└─ EV charger
**Step 2**: Install the Masterpiece Plugin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To extend the application with the **masterpiece_plugin**:
.. code-block:: bash
pip install masterpiece_plugin
Run the application again:
.. code-block:: bash
python examples/myhome.py
You'll now see a new object in the instance hierarchy, along with a friendly "Hello, World!" object.
**Example output**:
.. code-block:: text
home
├─ grid
├─ downstairs
│ └─ kitchen
│ ├─ oven
│ └─ fridge
├─ garage
│ └─ EV charger
└─ Hello World - A Plugin
**Step 3**: Configurating
^^^^^^^^^^^^^^^^^^^^^^^^^
The application also demonstrates the usage of startup arguments. Run the application again:
.. code-block:: text
examples/myhome.py --init --solar 10 --color red
and new 'Solar plant 10 kW' object appears in the tree.
- The ``--init`` argument tells the application to save its current configuration to a configuration files.
- The ``--solar`` argument creates an instance of a solar power plant with a specified peak power of 10 kW.
- The ``--color`` argument can be used for setting the color for the tree diagram.
The above class properties (and many more) can also be defined in the class configuration files. By default,
the configuration files are created in the ``~/.myhome/config`` folder, as determined by the ``application identifier``
and ``--config [anyname]``.
For example, ``--config temp`` will use the configuration files stored in the ``~/.myhome/temp/``
folder.
What's next
-----------
Congratulations! You've successfully installed Masterpiece, extended it with a plugin, and explored its configuration system.
But what is all this for?
That part is up to your imagination. Here's what you can explore next:
- Write Plugins: Develop your own plugins to extend Masterpiece with domain-specific functionality.
Use the masterpiece_plugin as a starting point for inspiration.
- Leverage Configurations: Take advantage of configuration files to fine-tune your application's behavior
without changing the code. Experiment with the --config argument to manage multiple configurations for
different scenarios.
- Design a Custom Application: Build a unique application that fits your needs by combining existing plugins,
creating new objects in the instance hierarchy, and integrating external services or data sources.
- Contribute to the Community: Share your plugins or improvements with the Masterpiece community.
Masterpiece provides the building blocks. Where you go from here is entirely up to you. Happy coding!
Contributing
------------
Please check out the `Masterpiece Issue Board <https://gitlab.com/juham/masterpiece/-/boards>`_ for tracking progress
and tasks.
Developer Documentation
-----------------------
For full documentation and usage details, see the full documentation at `Documentation Index <docs/build/html/index.html>`_
(The docs may look rough; I’m still unraveling Sphinx's mysteries).
Special Thanks
--------------
Big thanks to the generous support of [Mahi.fi](https://mahi.fi) for helping bring this framework to life.
Raw data
{
"_id": null,
"home_page": null,
"name": "masterpiece",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "\"J. Meskanen\" <juham.api@gmail.com>",
"keywords": "object-oriented, plugin, framework",
"author": null,
"author_email": "J Meskanen <juham.api@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/59/d8/9075e2366e6e726b49c205d86f56415908a9c79cbf6f899dfe6545675133/masterpiece-0.1.5.tar.gz",
"platform": null,
"description": "Masterpiece\u2122 (**Development Status 2 - Pre-Alpha**)\r\n====================================================\r\n\r\nTry to be Nice\r\n--------------\r\n\r\nWelcome to **Masterpiece\u2122** - Quite a Piece of Work!\r\n\r\nMasterpiece\u2122 is a **Python framework** designed for creating modular, scalable, plugin-aware, multi-threaded, and \r\nobject-oriented applications with a hierarchical structure.\r\n\r\nThe name 'Masterpiece' was chosen to reflect a commitment to fine-grained modular design, with a touch of humor.\r\n\r\n\r\n\r\n\r\nGoals\r\n-----\r\n\r\nHave fun while learning the Python ecosystem! The ultimate enjoyment, with a sprinkling of practicality, will be \r\nachieved by cranking the Fun-O-Meter\u2122 up to 11. Coding should feel like a rollercoaster ride\u2014minus the screaming \r\nand the long lines.\r\n\r\n* **Pythonic Purity:**: Designed with strict adherence to Python conventions, ensuring idiomatic, readable, and maintainable code.\r\n* **First-Time Excellence**: A framework that's reliable, correct, and efficient from the start, \r\n and fun\u2014because what\u2019s a framework without a little joy?\r\n* **Completeness**: A minimal yet robust API providing developers with total control over everything.\r\n* **Productivity**: Reusable code to achieve maximum functionality with a minimal amount of code (read: money),\r\n and productivity increaseing with the size of the project. \r\n\r\nIf you appreciate these design concepts, look no further; you've come to the right place! \r\n\r\n\r\nProject Status and Current State\r\n--------------------------------\r\n\r\nHere\u2019s what is currently available:\r\n\r\n* **Bug-Free Status**: Absolutely bug-free \u2014 just kidding! There are no known bugs remaining, as far as I can tell.\r\n* **Wiki:** First Wiki pages under construction `Masterpiece Wiki <https://gitlab.com/juham/masterpiece/-/wikis/home>`_ \r\n* **Tutorial**: First tutorial `tutorial <docs/source/tutorial.rst>`_ to help you to get started with writing masterpieces. \r\n* **Package Infrastructure**: The basic Python package setup is finalized and configured with `pyproject.toml`.\r\n* **Classes**: The existing classes have been finalized. \r\n* **Example Application**: The example application `examples/myhome.py` prints out its instance structure when run. \r\n Despite its simplicity, it demonstrates the structure of a typical scalable and fully configurable software.\r\n* **Plugin Projects**: Several plugin projects, e.g. `masterpiece_plugin` that plugs in a \"Hello World\" greeting to \r\n `myhome.py`, demonstrating a minimal yet fully functional plugin.\r\n\r\n\r\nWhat is currently not there yet:\r\n\r\n* **Threads:** This will be the focus of the next milestone. While multi-threading in Python might make some \r\n developers raise an eyebrow due to the well-known Global Interpreter Lock (GIL), I trust the Python community \r\n will continue to address these concerns. \r\n\r\n* **MQTT:**: This will also be a priority for the next milestone. The goal is for MasterPiece objects to \r\n communicate seamlessly with each other using the MQTT protocol, enabling efficient message passing in \r\n distributed environments.\r\n\r\n* **User Interface:**: Instead of reinventing the wheel, Grafana will be the first choice for visualization \r\n and user interaction. Grafana\u2019s powerful and flexible interface will streamline the development process while \r\n providing users with a robust, ready-made solution.\r\n\r\n\r\nProjects\r\n--------\r\n\r\nMasterpiece comes in four Python projects:\r\n\r\n1. **Masterpiece (core framework)**: \r\n This is the core framework for building plugin-aware, multi-threaded applications. It includes a simple yet \r\n fully functional application to help you get started and serves as a plugin-aware reference application \r\n that can be scaled up to any size.\r\n\r\n2. **Masterpiece Plugin (plugin example)**: \r\n This is a basic plugin example that demonstrates how to create third-party plugins for applications built \r\n using Masterpiece. It\u2019s as simple as saying **\"Hello, World!\"**, literally.\r\n\r\n3. **Masterpiece XML Format plugin:**: \r\n This is a complete plugin example that demonstrates how to add new serialization format to\r\n Masterpiece. \r\n\r\n4. **Masterpiece Yaml Format plugin:**: \r\n Another format plugin. Adds Yaml support to Masterpiece.\r\n\r\n\r\n**Note**: This project contains only the core framework. The plugins are provided as a separate projects:\r\n\r\n* `masterpiece_plugin <https://gitlab.com/juham/masterpiece_plugin>`_ .\r\n* `masterpiece_xmlformat <https://gitlab.com/juham/masterpiece_xmlformat>`_.\r\n* `masterpiece_yamlformat <https://gitlab.com/juham/masterpiece_yamlformat>`_.\r\n\r\n\r\n\r\nInstalling Masterpiece\r\n----------------------\r\n\r\n**Step 1**: Install Masterpiece and run the example application\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nTo install the core framework:\r\n\r\n.. code-block:: bash\r\n\r\n pip install masterpiece\r\n\r\nThen, navigate to the example folder and run the application:\r\n\r\n.. code-block:: bash\r\n\r\n python examples/myhome.py\r\n\r\nThe application will print out its instance hierarchy. This is a simple example application to demonstrate the\r\nbasic structure of any multi-threaded, plugin-based, scalable MasterPiece applications.\r\n\r\n**Example output**:\r\n\r\n.. code-block:: text\r\n\r\n home\r\n \u251c\u2500 grid\r\n \u251c\u2500 downstairs\r\n \u2502 \u2514\u2500 kitchen\r\n \u2502 \u251c\u2500 oven\r\n \u2502 \u2514\u2500 fridge\r\n \u2514\u2500 garage\r\n \u2514\u2500 EV charger\r\n\r\n**Step 2**: Install the Masterpiece Plugin\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nTo extend the application with the **masterpiece_plugin**:\r\n\r\n.. code-block:: bash\r\n\r\n pip install masterpiece_plugin\r\n\r\nRun the application again:\r\n\r\n.. code-block:: bash\r\n\r\n python examples/myhome.py\r\n\r\nYou'll now see a new object in the instance hierarchy, along with a friendly \"Hello, World!\" object.\r\n\r\n**Example output**:\r\n\r\n.. code-block:: text\r\n\r\n home\r\n \u251c\u2500 grid\r\n \u251c\u2500 downstairs\r\n \u2502 \u2514\u2500 kitchen\r\n \u2502 \u251c\u2500 oven\r\n \u2502 \u2514\u2500 fridge\r\n \u251c\u2500 garage\r\n \u2502 \u2514\u2500 EV charger\r\n \u2514\u2500 Hello World - A Plugin\r\n\r\n**Step 3**: Configurating\r\n^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nThe application also demonstrates the usage of startup arguments. Run the application again:\r\n\r\n.. code-block:: text\r\n\r\n examples/myhome.py --init --solar 10 --color red\r\n\r\nand new 'Solar plant 10 kW' object appears in the tree.\r\n\r\n- The ``--init`` argument tells the application to save its current configuration to a configuration files. \r\n- The ``--solar`` argument creates an instance of a solar power plant with a specified peak power of 10 kW.\r\n- The ``--color`` argument can be used for setting the color for the tree diagram.\r\n\r\nThe above class properties (and many more) can also be defined in the class configuration files. By default, \r\nthe configuration files are created in the ``~/.myhome/config`` folder, as determined by the ``application identifier`` \r\nand ``--config [anyname]``.\r\n\r\nFor example, ``--config temp`` will use the configuration files stored in the ``~/.myhome/temp/`` \r\nfolder.\r\n\r\n\r\nWhat's next\r\n-----------\r\n\r\nCongratulations! You've successfully installed Masterpiece, extended it with a plugin, and explored its configuration system. \r\nBut what is all this for? \r\n\r\nThat part is up to your imagination. Here's what you can explore next:\r\n\r\n- Write Plugins: Develop your own plugins to extend Masterpiece with domain-specific functionality.\r\n Use the masterpiece_plugin as a starting point for inspiration.\r\n\r\n- Leverage Configurations: Take advantage of configuration files to fine-tune your application's behavior \r\n without changing the code. Experiment with the --config argument to manage multiple configurations for \r\n different scenarios.\r\n\r\n- Design a Custom Application: Build a unique application that fits your needs by combining existing plugins, \r\n creating new objects in the instance hierarchy, and integrating external services or data sources.\r\n\r\n- Contribute to the Community: Share your plugins or improvements with the Masterpiece community. \r\n\r\nMasterpiece provides the building blocks. Where you go from here is entirely up to you. Happy coding!\r\n\r\n\r\nContributing\r\n------------\r\n\r\nPlease check out the `Masterpiece Issue Board <https://gitlab.com/juham/masterpiece/-/boards>`_ for tracking progress \r\nand tasks.\r\n\r\n\r\nDeveloper Documentation\r\n-----------------------\r\n\r\nFor full documentation and usage details, see the full documentation at `Documentation Index <docs/build/html/index.html>`_ \r\n(The docs may look rough; I\u2019m still unraveling Sphinx's mysteries).\r\n\r\n\r\nSpecial Thanks\r\n--------------\r\n\r\nBig thanks to the generous support of [Mahi.fi](https://mahi.fi) for helping bring this framework to life.\r\n",
"bugtrack_url": null,
"license": "MIT License =========== Copyright (c) 2024, Juha Meskanen 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 ",
"summary": "Masterpiece framework",
"version": "0.1.5",
"project_urls": {
"Bug Reports": "https://gitlab.com/juham/masterpiece",
"Homepage": "https://gitlab.com/juham/masterpiece",
"Say Thanks!": "http://meskanen.com",
"Source": "https://gitlab.com/juham/masterpiece"
},
"split_keywords": [
"object-oriented",
" plugin",
" framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f2ad1e812e877860e731613d05a4428d262bfb8605dd0afbb83c115c383cc388",
"md5": "12db01d5e76b53cf9c8cf9dfc2124503",
"sha256": "3d3d5c279e0987e203f1bd2b6b0a6b9b7bcd7206ee6da678d48f5a0a669f86f1"
},
"downloads": -1,
"filename": "masterpiece-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "12db01d5e76b53cf9c8cf9dfc2124503",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 28025,
"upload_time": "2024-12-08T07:16:59",
"upload_time_iso_8601": "2024-12-08T07:16:59.505792Z",
"url": "https://files.pythonhosted.org/packages/f2/ad/1e812e877860e731613d05a4428d262bfb8605dd0afbb83c115c383cc388/masterpiece-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "59d89075e2366e6e726b49c205d86f56415908a9c79cbf6f899dfe6545675133",
"md5": "4510a0ae8039e80a77bc3be02b24bef5",
"sha256": "77443b9410a54ba2fbf233ac09b2174fa02a8dc7cfa4478cfd212d61d2401813"
},
"downloads": -1,
"filename": "masterpiece-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "4510a0ae8039e80a77bc3be02b24bef5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 1190994,
"upload_time": "2024-12-08T07:17:04",
"upload_time_iso_8601": "2024-12-08T07:17:04.933997Z",
"url": "https://files.pythonhosted.org/packages/59/d8/9075e2366e6e726b49c205d86f56415908a9c79cbf6f899dfe6545675133/masterpiece-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-08 07:17:04",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "juham",
"gitlab_project": "masterpiece",
"lcname": "masterpiece"
}