Commit Graph

186 Commits

Author SHA1 Message Date
Fabio Manganiello a6f7b6e790 Added more default imports under the `platypush` module root.
These objects can now also be imported in scripts through
`from platypush import <name>`:

- `Variable`
- `cron`
- `hook`
- `procedure`
2024-05-02 00:51:09 +00:00
Fabio Manganiello 266ee3cadf Expose `run` on the base package level.
This enables a syntax like:

```
from platypush import run

run('application.restart')
```
2023-11-03 20:54:46 +00:00
Fabio Manganiello dc1a152433
Added `get_default_pid_file` utility method. 2023-08-14 10:47:25 +02:00
Fabio Manganiello 37dcaba7a1
Refactored structure of main application and startup scripts.
The main application class has been moved from __init__ to the app
module.

__init__ will contain instead the relevant global variables and the
modules and objects exposed to external integrations - such as
`get_plugin` and `get_backend`, or the `main` itself.

This will make future integrations much easier - the global __init__
doesn't contain any business logic now, it can import anything without
fearing circular dependencies, and it can limit its exposed objects to
those that we want to expose to 3rd-party integrations and scripts.

It will also make it easier to extend the main entry point with
additional logic - such as a supervisor or an embedded Redis server.
2023-07-23 23:12:36 +02:00
Fabio Manganiello 0dc380fa94
Removed dependency from prctl.
Also, black'd and LINT-fixed some files that hadn't been touched in a
while.
2023-07-23 19:17:30 +02:00
Fabio Manganiello 1d98f54c54
Bump version: 0.50.2 → 0.50.3 2023-07-22 23:36:04 +02:00
Fabio Manganiello 66981bd00b
Updated email addresses and black'd some old source files. 2023-07-22 23:02:44 +02:00
Fabio Manganiello c846c61493
Refactored `Config.__init__`.
The constructor of the `Config` class had grown too big. It's much more
manageable if split into multiple sub-constructor helpers.
2023-07-15 13:38:07 +02:00
Fabio Manganiello e0af2daaff
Bump version: 0.50.1 → 0.50.2 2023-06-30 23:12:40 +02:00
Fabio Manganiello f3b2386ed6
Bump version: 0.50.0 → 0.50.1 2023-06-28 02:44:13 +02:00
Fabio Manganiello 08c3a1e11a
Bump version: 0.24.5 → 0.50.0 2023-06-28 02:23:09 +02:00
Fabio Manganiello 7fa545d7f8
Merge branch 'master' into 29-generic-entities-support 2023-02-22 00:46:33 +01:00
Fabio Manganiello c645ce6bb8
Bump version: 0.24.4 → 0.24.5 2023-02-22 00:32:57 +01:00
Fabio Manganiello 0513339be7
Merge branch 'master' into 29-generic-entities-support 2022-12-20 23:06:19 +01:00
Fabio Manganiello 84ce31cab0
Bump version: 0.24.3 → 0.24.4 2022-12-20 23:05:42 +01:00
Fabio Manganiello 9ddebb920f
Merge branch 'master' into 29-generic-entities-support 2022-12-17 00:51:51 +01:00
Fabio Manganiello 6666f5581c
Bump version: 0.24.2 → 0.24.3 2022-12-17 00:31:22 +01:00
Fabio Manganiello 2ee2a1d7b5
Replaced `disable_logging` with a more generic `logging_level`.
The `disable_logging` attribute was only available on events and
responses, and it could only either entirely disable or enable logging
for all the events of a certain type.

The new flag allows more customization by setting the default logging
level used for any message of a certain type (or `None` to disable
logging). This makes it possible to e.g. set some verbose events to
debug level, and the user can see them if they configure the application
in debug mode.

It also delegates the logging logic to the message itself, instead of
having different parts of the application handling their own logic.
2022-12-11 11:46:37 +01:00
Fabio Manganiello d4b540dd67
Replaced `disable_logging` with a more generic `logging_level`.
The `disable_logging` attribute was only available on events and
responses, and it could only either entirely disable or enable logging
for all the events of a certain type.

The new flag allows more customization by setting the default logging
level used for any message of a certain type (or `None` to disable
logging). This makes it possible to e.g. set some verbose events to
debug level, and the user can see them if they configure the application
in debug mode.

It also delegates the logging logic to the message itself, instead of
having different parts of the application handling their own logic.
2022-12-11 11:39:38 +01:00
Fabio Manganiello aa3479abeb
Added [-v|--verbose] and --version options to the command line. 2022-12-11 10:59:12 +01:00
Fabio Manganiello a1d3724b8d
Added [-v|--verbose] and --version options to the command line. 2022-12-11 10:54:03 +01:00
Fabio Manganiello 5a47308516
Merge branch 'master' into 29-generic-entities-support 2022-12-10 15:57:28 +01:00
Fabio Manganiello 4c8190ac14
Bump version: 0.24.1 → 0.24.2 2022-12-10 15:37:49 +01:00
Fabio Manganiello 3b1147eaae Bump version: 0.24.0 → 0.24.1 2022-12-08 12:33:34 +01:00
Fabio Manganiello 00fca6b187
Merge branch 'master' into 29-generic-entities-support 2022-12-04 20:58:06 +01:00
Fabio Manganiello 73f6712f7a
Bump version: 0.23.6 → 0.24.0 2022-11-22 00:12:25 +01:00
Fabio Manganiello 26f869b6e4
LINT fixes 2022-11-11 21:49:38 +01:00
Fabio Manganiello 84bb77bd5b
Replaced ambiguous logger variable name 2022-11-11 20:37:39 +01:00
Fabio Manganiello deb25196d2
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-09-28 02:17:10 +02:00
Fabio Manganiello a0575ed6de
Bump version: 0.23.5 → 0.23.6 2022-09-19 20:41:02 +02:00
Fabio Manganiello c2a3f2f4f3
Bump version: 0.23.4 → 0.23.5 2022-09-18 19:55:05 +02:00
Fabio Manganiello 1880a99052
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-08-29 01:41:47 +02:00
Fabio Manganiello b11a0e8bbb
Bump version: 0.23.3 → 0.23.4 2022-08-28 15:27:54 +02:00
Fabio Manganiello 0919a0055d
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-06-02 00:13:43 +02:00
Fabio Manganiello b857ce60a7
Bump version: 0.23.2 → 0.23.3 2022-06-01 23:08:32 +02:00
Fabio Manganiello 30dfdeecb0
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-05-25 10:11:57 +02:00
Fabio Manganiello 239025290d
--redis-queue argument should be a string 2022-05-25 10:11:29 +02:00
Fabio Manganiello 4ee7e4db29
Basic support for entities on the local db and implemented support for switch entities on the tplink plugin 2022-04-04 16:50:17 +02:00
Fabio Manganiello 2e33d3b3c5
Bump version: 0.23.1 → 0.23.2 2022-03-27 16:43:36 +02:00
Fabio Manganiello 7c9e9d284d
Bump version: 0.23.0 → 0.23.1 2022-03-01 12:50:31 +01:00
Fabio Manganiello c0039c3f87
Bump version: 0.22.10 → 0.23.0 2022-03-01 01:33:43 +01:00
Fabio Manganiello 42ee149b95
Bump version: 0.22.9 → 0.22.10 2022-02-07 15:59:20 +01:00
Fabio Manganiello 833e1c49be
Bump version: 0.22.8 → 0.22.9 2022-01-06 14:08:55 +01:00
Fabio Manganiello 081da3eb84
Bump version: 0.22.7 → 0.22.8 2021-12-13 21:21:42 +01:00
Fabio Manganiello 6df9cbcf3c
Bump version: 0.22.6 → 0.22.7 2021-12-13 20:47:50 +01:00
Fabio Manganiello f74ca28382
Bump version: 0.22.5 → 0.22.6 2021-11-27 10:56:28 +01:00
Fabio Manganiello adb9672989
Bump version: 0.22.4 → 0.22.5 2021-11-15 00:12:42 +01:00
Fabio Manganiello 6c0a8bf259
Bump version: 0.22.3 → 0.22.4 2021-10-19 23:30:25 +02:00
Fabio Manganiello d844890ab2 Bump version: 0.22.2 → 0.22.3 2021-10-01 23:53:05 +02:00
Fabio Manganiello c12c83b386 Bump version: 0.22.1 → 0.22.2 2021-09-25 12:54:01 +02:00