protoc-gen-sqlmodel 0.1.0__tar.gz → 0.1.1__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.
- protoc_gen_sqlmodel-0.1.1/LICENSE +21 -0
- protoc_gen_sqlmodel-0.1.1/PKG-INFO +89 -0
- protoc_gen_sqlmodel-0.1.1/README.md +53 -0
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/pyproject.toml +11 -4
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/pyproject.toml.orig +7 -4
- protoc_gen_sqlmodel-0.1.0/PKG-INFO +0 -19
- protoc_gen_sqlmodel-0.1.0/README.md +0 -6
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/src/protoc_gen_sqlmodel/__init__.py +0 -0
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/src/protoc_gen_sqlmodel/plugin.py +0 -0
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/src/protoc_gen_sqlmodel/proto/__init__.py +0 -0
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/src/protoc_gen_sqlmodel/proto/sqlmodel_extensions.proto +0 -0
- {protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/src/protoc_gen_sqlmodel/proto/sqlmodel_extensions_pb.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 River Studio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: protoc-gen-sqlmodel
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: protoc plugin to generate SQLModel classes
|
|
5
|
+
Author: River Studio
|
|
6
|
+
Author-email: River Studio <git@river-studio.net>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 River Studio
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
30
|
+
Requires-Dist: logging>=0.4.9.6
|
|
31
|
+
Requires-Dist: protobuf-py>=0.4.0
|
|
32
|
+
Requires-Dist: protoc-gen-py>=0.4.0
|
|
33
|
+
Requires-Dist: sqlmodel>=0.0.42
|
|
34
|
+
Requires-Python: >=3.14
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# protoc-gen-sqlmodel
|
|
38
|
+
A protoc plugin for producing sqlmodel classes.
|
|
39
|
+
Meant to manage multi-language projects with a single source of truth called protobuf.
|
|
40
|
+
Generate SQLModel from your schema and manage your DB with alembic.
|
|
41
|
+
|
|
42
|
+
# Install
|
|
43
|
+
Add to your project:
|
|
44
|
+
```shell
|
|
45
|
+
uv add protoc-gen-sqlmodel
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Then configure like a regular `buf` plugin in a `bug.gen.yaml` file:
|
|
49
|
+
```yml
|
|
50
|
+
version: v2
|
|
51
|
+
inputs:
|
|
52
|
+
- directory: proto
|
|
53
|
+
plugins:
|
|
54
|
+
- local: protoc-gen-sqlmodel
|
|
55
|
+
out: gen
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
# Usage
|
|
59
|
+
Run with `protoc` or (preferred) with `uv run buf-generate`.
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
To mark a model as a table, include the following extension in your proto files:
|
|
63
|
+
```proto
|
|
64
|
+
syntax = "proto3";
|
|
65
|
+
|
|
66
|
+
package example.sqlmodel;
|
|
67
|
+
|
|
68
|
+
import "google/protobuf/descriptor.proto";
|
|
69
|
+
|
|
70
|
+
// Marks a protobuf message as a SQLModel table.
|
|
71
|
+
extend google.protobuf.MessageOptions {
|
|
72
|
+
bool table = 50001;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
And mark the message schema as:
|
|
77
|
+
```proto
|
|
78
|
+
syntax = "proto3";
|
|
79
|
+
|
|
80
|
+
package example.models;
|
|
81
|
+
|
|
82
|
+
import "sqlmodel_extensions.proto";
|
|
83
|
+
|
|
84
|
+
message Entity {
|
|
85
|
+
option (example.sqlmodel.table) = true;
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The generated SQLModel will be marked as a table and you can use it directly with alembic for DB management.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# protoc-gen-sqlmodel
|
|
2
|
+
A protoc plugin for producing sqlmodel classes.
|
|
3
|
+
Meant to manage multi-language projects with a single source of truth called protobuf.
|
|
4
|
+
Generate SQLModel from your schema and manage your DB with alembic.
|
|
5
|
+
|
|
6
|
+
# Install
|
|
7
|
+
Add to your project:
|
|
8
|
+
```shell
|
|
9
|
+
uv add protoc-gen-sqlmodel
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Then configure like a regular `buf` plugin in a `bug.gen.yaml` file:
|
|
13
|
+
```yml
|
|
14
|
+
version: v2
|
|
15
|
+
inputs:
|
|
16
|
+
- directory: proto
|
|
17
|
+
plugins:
|
|
18
|
+
- local: protoc-gen-sqlmodel
|
|
19
|
+
out: gen
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
# Usage
|
|
23
|
+
Run with `protoc` or (preferred) with `uv run buf-generate`.
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
To mark a model as a table, include the following extension in your proto files:
|
|
27
|
+
```proto
|
|
28
|
+
syntax = "proto3";
|
|
29
|
+
|
|
30
|
+
package example.sqlmodel;
|
|
31
|
+
|
|
32
|
+
import "google/protobuf/descriptor.proto";
|
|
33
|
+
|
|
34
|
+
// Marks a protobuf message as a SQLModel table.
|
|
35
|
+
extend google.protobuf.MessageOptions {
|
|
36
|
+
bool table = 50001;
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
And mark the message schema as:
|
|
41
|
+
```proto
|
|
42
|
+
syntax = "proto3";
|
|
43
|
+
|
|
44
|
+
package example.models;
|
|
45
|
+
|
|
46
|
+
import "sqlmodel_extensions.proto";
|
|
47
|
+
|
|
48
|
+
message Entity {
|
|
49
|
+
option (example.sqlmodel.table) = true;
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The generated SQLModel will be marked as a table and you can use it directly with alembic for DB management.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "protoc-gen-sqlmodel"
|
|
3
|
-
version = "0.1.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.1.1"
|
|
4
|
+
description = "protoc plugin to generate SQLModel classes"
|
|
5
5
|
readme = "README.md"
|
|
6
|
+
classifiers = [
|
|
7
|
+
"License :: OSI Approved :: Apache Software License",
|
|
8
|
+
"Programming Language :: Python :: 3.14",
|
|
9
|
+
]
|
|
6
10
|
requires-python = ">=3.14"
|
|
7
11
|
dependencies = [
|
|
8
12
|
"logging>=0.4.9.6",
|
|
@@ -11,9 +15,12 @@ dependencies = [
|
|
|
11
15
|
"sqlmodel>=0.0.42",
|
|
12
16
|
]
|
|
13
17
|
|
|
18
|
+
[project.license]
|
|
19
|
+
file = "LICENSE"
|
|
20
|
+
|
|
14
21
|
[[project.authors]]
|
|
15
|
-
name = "
|
|
16
|
-
email = "
|
|
22
|
+
name = "River Studio"
|
|
23
|
+
email = "git@river-studio.net"
|
|
17
24
|
|
|
18
25
|
[project.scripts]
|
|
19
26
|
protoc-gen-sqlmodel = "protoc_gen_sqlmodel:main"
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "protoc-gen-sqlmodel"
|
|
3
|
-
version = "0.1.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.1.1"
|
|
4
|
+
description = "protoc plugin to generate SQLModel classes"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
license = { file = "LICENSE" }
|
|
7
|
+
authors = [{ name = "River Studio", email = "git@river-studio.net" }]
|
|
8
|
+
classifiers = [
|
|
9
|
+
"License :: OSI Approved :: Apache Software License",
|
|
10
|
+
"Programming Language :: Python :: 3.14",
|
|
8
11
|
]
|
|
9
12
|
requires-python = ">=3.14"
|
|
10
13
|
dependencies = [
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: protoc-gen-sqlmodel
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Add your description here
|
|
5
|
-
Author: river-studio-main
|
|
6
|
-
Author-email: river-studio-main <62842368+river-studio-main@users.noreply.github.com>
|
|
7
|
-
Requires-Dist: logging>=0.4.9.6
|
|
8
|
-
Requires-Dist: protobuf-py>=0.4.0
|
|
9
|
-
Requires-Dist: protoc-gen-py>=0.4.0
|
|
10
|
-
Requires-Dist: sqlmodel>=0.0.42
|
|
11
|
-
Requires-Python: >=3.14
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
|
|
14
|
-
# protoc-gen-sqlmodel
|
|
15
|
-
A protoc plugin for producing sqlmodel classes
|
|
16
|
-
Run with:
|
|
17
|
-
```shell
|
|
18
|
-
uv run protoc input.proto --plugin=protoc-gen-custom-plugin=./plugin.py --custom-plugin_out=.
|
|
19
|
-
```
|
|
File without changes
|
|
File without changes
|
{protoc_gen_sqlmodel-0.1.0 → protoc_gen_sqlmodel-0.1.1}/src/protoc_gen_sqlmodel/proto/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|