scruby-plugin 2.2.2__py3-none-any.whl → 2.2.4__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scruby-plugin
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Library for creating Scruby plugins.
5
5
  Project-URL: Bug Tracker, https://github.com/kebasyaty/scruby-plugin/issues
6
6
  Project-URL: Changelog, https://github.com/kebasyaty/scruby-plugin/blob/v2/CHANGELOG.md
@@ -10,7 +10,7 @@ Project-URL: Source, https://github.com/kebasyaty/scruby-plugin
10
10
  Author-email: kebasyaty <kebasyaty@gmail.com>
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE
13
- Keywords: create,database,plugin,scruby
13
+ Keywords: async,create,database,plugin,scruby
14
14
  Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Intended Audience :: Developers
16
16
  Classifier: Operating System :: MacOS :: MacOS X
@@ -81,7 +81,7 @@ class PluginName(ScrubyPlugin):
81
81
 
82
82
  ```python
83
83
  import anyio
84
- from typing import Any
84
+ from typing import Annotated, Any
85
85
  from pydantic import Field
86
86
  from scruby import Scruby, ScrubyModel
87
87
  from scruby_plugin import ScrubyPlugin
@@ -100,16 +100,19 @@ class CollectionMeta(ScrubyPlugin):
100
100
 
101
101
  class Car(ScrubyModel):
102
102
  """Car model."""
103
- brand: str = Field(strict=True, frozen=True)
104
- model: str = Field(strict=True, frozen=True)
105
- year: int = Field(strict=True)
106
- power_reserve: int = Field(strict=True)
103
+
104
+ brand: str = Field(frozen=True)
105
+ model: str = Field(frozen=True)
106
+ year: int
107
+ power_reserve: int
107
108
  # key is always at bottom
108
- key: str = Field(
109
- strict=True,
110
- frozen=True,
111
- default_factory=lambda data: f"{data['brand']}:{data['model']}",
112
- )
109
+ key: Annotated[
110
+ str,
111
+ Field(
112
+ frozen=True,
113
+ default_factory=lambda data: f"{data['brand']}:{data['model']}",
114
+ ),
115
+ ]
113
116
 
114
117
 
115
118
  async def main() -> None:
@@ -1,7 +1,7 @@
1
1
  scruby_plugin/__init__.py,sha256=kWaqpz4RYNT9Kc9FF6jj0GX1Mppm1uhFfArPY6EYneI,241
2
2
  scruby_plugin/plugin.py,sha256=DkKhcHrmfSJ9kaYqyfbYxIEc0ICyPbGzKsoGEHjRTRY,615
3
3
  scruby_plugin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- scruby_plugin-2.2.2.dist-info/METADATA,sha256=kDa_0TCQk6TSPJ-_5ijzrhnlsvxYMA-ChJ_g47LuD_Q,5404
5
- scruby_plugin-2.2.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
6
- scruby_plugin-2.2.2.dist-info/licenses/LICENSE,sha256=mvh5qv1YJGyuVCkRxonDDNOzxlwXszKvwxXfOeXKrqw,1074
7
- scruby_plugin-2.2.2.dist-info/RECORD,,
4
+ scruby_plugin-2.2.4.dist-info/METADATA,sha256=IoDlla_FhN5DgPrQbUVCh2rbY63BRgixQMX5JbILdJg,5378
5
+ scruby_plugin-2.2.4.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
6
+ scruby_plugin-2.2.4.dist-info/licenses/LICENSE,sha256=mvh5qv1YJGyuVCkRxonDDNOzxlwXszKvwxXfOeXKrqw,1074
7
+ scruby_plugin-2.2.4.dist-info/RECORD,,