Fabio Manganiello
d5514d7f27
Added `utils.is_debug_enabled`.
2023-10-31 00:44:05 +00:00
Fabio Manganiello
c7acc03c8f
[`inspect`] Added `get_enabled_plugins` and `get_enabled_backends` actions.
2023-10-18 22:10:32 +02:00
Fabio Manganiello
d1afb88b80
[Reflection] Expand RST extensions from object docstrings too.
2023-10-16 00:21:49 +02:00
Fabio Manganiello
5726c6985f
Added utility function to get the defining class of a method.
2023-10-10 01:35:01 +02:00
Fabio Manganiello
52e353dc14
Expose the wrapped function in `@action`.
...
Added a `wrapped` "hidden" parameter to the function returned by the
`@action` decorator.
We need this to access the underlying decorated function when e.g. we
need to access its specs or decorators.
2023-10-09 22:35:08 +02:00
Fabio Manganiello
608844ca0c
[WIP] Large refactor of the inspection plugin and models.
2023-10-09 01:33:44 +02:00
Fabio Manganiello
343972b520
New `IntegrationMetadata` generic util class.
...
continuous-integration/drone/push Build is passing
Details
This object is in charge of parsing all the metadata of a
plugin/backend.
2023-09-30 02:28:20 +02:00
Fabio Manganiello
b746d0b402
Moved `get_message_response` to `platypush.utils`.
...
continuous-integration/drone/push Build is passing
Details
It is general-purpose enough to be used by all the integrations, not
only by the HTTP backend.
2023-09-05 13:03:30 +02:00
Fabio Manganiello
9aaf2559fa
Added `utils.is_root` method.
2023-08-31 23:21:32 +02:00
Fabio Manganiello
b10ccdb313
Added get_src_root utility function.
2023-08-23 02:53:31 +02:00
Fabio Manganiello
1825b492b3
Replaced `Config.workdir` with `Config.get_workdir()`.
...
Again, Python < 3.9 doesn't like class properties.
2023-08-19 13:21:24 +02:00
Fabio Manganiello
7157936b87
Added get_remaining_timeout utility function.
2023-08-14 23:17:50 +02:00
Fabio Manganiello
dc1a152433
Added `get_default_pid_file` utility method.
2023-08-14 10:47:25 +02:00
Fabio Manganiello
e9a568fdd2
Unified interface to retrieve the Redis bus configuration.
...
A common `utils.get_redis_conf` has been created to handle the cascade
fallback logic used to retrive the default Redis configuration.
2023-07-24 01:04:13 +02:00
Fabio Manganiello
3e3d47aa44
Check first the configuration of the Redis plugin and then that of the backend.
2023-07-24 00:26:49 +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
61ea3d79e4
Large refactor for the `inspect` plugin.
...
More common logic has been extracted and all the methods and classes
have been documented and black'd.
2023-05-17 00:05:22 +02:00
Fabio Manganiello
42d468c895
`get_lock` should raise a TimeoutError if `lock.acquire` is False
2023-03-31 22:31:32 +02:00
Fabio Manganiello
1efaff878e
Rewritten `serial` plugin.
...
`backend.serial` has been removed and the polling logic merged into the
`serial` plugin.
The `serial` plugin now supports the new entity engine as well.
2023-03-31 14:31:45 +02:00
Fabio Manganiello
fde834c1b1
More LINT fixes + refactors
2023-02-05 22:00:50 +01:00
Fabio Manganiello
4849e14414
LINT fixes for the `utils` module + additional documentation
2023-02-05 18:05:41 +01:00
Fabio Manganiello
5a47308516
Merge branch 'master' into 29-generic-entities-support
2022-12-10 15:57:28 +01:00
Fabio Manganiello
5ba3fa1b5b
FIX: Parenthesized context managers are only available in Python >= 3.10
...
Since Parenthesized context managers are only supported on very recent
versions of Python (thanks black for breaking back-compatibility), we
should still use the old multiline syntax - it's not worth breaking
compatibility with Python >= 3.6 and < 3.10 just to avoid typing a
backslash.
2022-12-08 12:28:36 +01:00
Fabio Manganiello
ba1681fc22
Merge branch 'master' into 29-generic-entities-support
2022-11-21 12:36:01 +01:00
Fabio Manganiello
a2c8e27bd8
Removed PyJWT dependency.
...
PyJWT is a very brittle and cumbersome dependency that expects several
cryptography libraries to be already installed on the system, and it can
lead to hard-to-debug errors when ported to different systems.
Moreover, it installs the whole `cryptography` package, which is several
MBs in size, takes time to compile, and it requires a Rust compiler to
be present on the target machine.
Platypush will now use the Python-native `rsa` module to handle JWT
tokens.
2022-11-21 12:30:38 +01:00
Fabio Manganiello
26ffc0b0e1
Use Redis instead of an in-process map to store the entity/plugin registry
...
This is particularly useful when we want to access the registry from
another process, like the web server or an external script.
2022-04-07 00:18:11 +02:00
Fabio Manganiello
1914322fda
FIX: get_plugin methods should never swallow errors in case of failed initialization
2022-02-07 01:47:38 +01:00
Fabio Manganiello
64c402b1c0
[ #115 ] Added `google.maps.get_travel_time` method
2021-10-16 22:35:37 +02:00
Fabio Manganiello
3bfc5b83ef
Moved to manifest files for describing plugins and backends and their dependencies
2021-09-16 17:53:40 +02:00
Fabio Manganiello
35c4a30a63
Added music.spotify plugin and refactored MusicPlugin
2021-07-17 22:14:15 +02:00
Fabio Manganiello
1f6c7aae60
get_redis() should be a general utility method
2021-06-26 11:14:26 +02:00
Fabio Manganiello
2a78f81a7b
Major LINT fixes
2021-04-05 00:58:44 +02:00
Fabio Manganiello
56f8d85feb
Migrated switches web panel and refactored switch plugins to expose a more consistent interface
2021-02-19 02:54:12 +01:00
Fabio Manganiello
b3c28f6773
Added support for JWT token-based authentication
2021-02-12 22:43:34 +01:00
Fabio Manganiello
85f56cf98c
New media panel [WIP]
2021-01-14 00:15:35 +01:00
Fabio Manganiello
1c84659e34
Support for Python cronjobs in scripts folder - closes #156
2020-10-13 23:25:27 +02:00
Fabio Manganiello
c269c62fe6
Refactored logging names
2020-09-27 01:33:38 +02:00
Fabio Manganiello
09f9e974b1
Camera plugins refactor
2020-09-25 17:19:43 +02:00
Fabio Manganiello
0cd28f7499
If the response contains errors in run() then raise a RuntimeError, otherwise return the output instead of the Response object
2020-04-10 00:06:36 +02:00
Fabio Manganiello
7b79e4b669
Support for multiple positional arguments on utils.run()
2020-04-09 23:50:08 +02:00
Fabio Manganiello
0dae03551f
Implemented interface for custom Python scripts, procedures and hooks [ closes #131 ]
2020-04-08 23:22:54 +02:00
Fabio Manganiello
c3c88b23fe
Added ESP8266/ESP32 integration ( closes #108 )
2020-01-17 21:16:14 +01:00
Fabio Manganiello
26ee3fc75c
Changed nav bar text to icons
2019-07-01 22:26:04 +02:00
Fabio Manganiello
3bd9bec660
MIME type utils method now compatible with multiple version of python-magic
2019-06-21 13:40:45 +02:00
Fabio Manganiello
4cd2e6949f
New media webplugin WIP
2019-06-21 02:13:14 +02:00
Fabio Manganiello
f201f039e9
Extended and normalized key names in GoogleFitEvent type
2019-03-16 19:28:47 +01:00
Fabio Manganiello
97d2e734ee
Moved import magic statement to the get_mime_type function so Travis won't break
2019-02-06 13:22:58 +01:00
Fabio Manganiello
6713ce0f03
Implemented support for casting local media through the localstream script
2019-02-06 11:51:44 +01:00
Fabio Manganiello
dc2a686d23
Support for casting torrents to Chromecast
2019-02-05 02:30:20 +01:00
Fabio Manganiello
52d0ba442b
Refactored webtorrent plugin and synchronization with the player
...
The WebTorrent plugin now uses the `download -o <download_dir> -p <port>` options.
Improved interaction both with the webtorrent executable and the player
executable, and triggering the right events upon state changes, as well
as free support for torrent streaming through the webtorrent executable.
2019-02-05 00:15:36 +01:00