ozobot-web 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ozobot-web
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Ozobot web drivers
|
|
5
|
+
Project-URL: Homepage, https://ozobot.com
|
|
6
|
+
Project-URL: Github, https://github.com/ozobot/python-libraries
|
|
7
|
+
Author-email: Ondrej Novak <ondrej.novak@ozobot.com>
|
|
8
|
+
Requires-Python: >=3.13
|
|
9
|
+
Requires-Dist: ozobot-common>=0.2
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# ozobot-web
|
|
13
|
+
This codebase defines a web-based robot driver for controlling Ozobot robots **via Pyodide** (web based Python) to TypeScript API.
|
|
14
|
+
|
|
15
|
+
The driver implements most of Ari and Evo API, leaving some of the model-specific implementation for the `ozobot-evo` and `ozobot-ari` packages.
|
|
16
|
+
|
|
17
|
+
See the [monorepo](https://github.com/ozobot/python-libraries) for more details.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# ozobot-web
|
|
2
|
+
This codebase defines a web-based robot driver for controlling Ozobot robots **via Pyodide** (web based Python) to TypeScript API.
|
|
3
|
+
|
|
4
|
+
The driver implements most of Ari and Evo API, leaving some of the model-specific implementation for the `ozobot-evo` and `ozobot-ari` packages.
|
|
5
|
+
|
|
6
|
+
See the [monorepo](https://github.com/ozobot/python-libraries) for more details.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
|
|
3
|
+
from loguru import logger
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
# this library is only present in web-python web application distribution
|
|
7
|
+
# if the import fails, we are running natively, and we can create a mock function instead
|
|
8
|
+
from _ozo import _rpcCoroutine # type: ignore[import]
|
|
9
|
+
|
|
10
|
+
except ImportError:
|
|
11
|
+
logger.warning(
|
|
12
|
+
"`_ozo` module could not be imported which is expected to happen when a web driver is used outside of the pyodide environment"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
async def _rpcCoroutine(object_name: str, func_name: str, args: list[typing.Any]) -> typing.Any:
|
|
16
|
+
raise NotImplementedError("`_rpcCoroutine` is only available in the pyodide environment")
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ozobot-web"
|
|
3
|
+
description = "Ozobot web drivers"
|
|
4
|
+
readme = "README.md"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Ondrej Novak", email = "ondrej.novak@ozobot.com" }
|
|
7
|
+
]
|
|
8
|
+
requires-python = ">=3.13"
|
|
9
|
+
dynamic = ["version"]
|
|
10
|
+
dependencies = [
|
|
11
|
+
"ozobot-common>=0.2",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[project.urls]
|
|
15
|
+
Homepage = "https://ozobot.com"
|
|
16
|
+
Github = "https://github.com/ozobot/python-libraries"
|
|
17
|
+
|
|
18
|
+
[tool.hatch.build.targets.sdist]
|
|
19
|
+
sources = ["src"]
|
|
20
|
+
only-include = ["src/ozobot"]
|
|
21
|
+
|
|
22
|
+
[tool.hatch.build.targets.wheel]
|
|
23
|
+
sources = ["src"]
|
|
24
|
+
only-include = ["src/ozobot"]
|
|
25
|
+
|
|
26
|
+
[tool.uv.sources]
|
|
27
|
+
ozobot-common = { workspace = true }
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
31
|
+
build-backend = "hatchling.build"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.version]
|
|
34
|
+
source = "vcs"
|
|
35
|
+
|
|
36
|
+
[tool.hatch.version.raw-options]
|
|
37
|
+
version_scheme = "no-guess-dev"
|
|
38
|
+
root = "../"
|
|
39
|
+
git_describe_command = ['git', 'describe', '--dirty', '--tags', '--long', '--abbrev=40', '--match', 'ozobot-web-*']
|