aristaproto 0.1.4__tar.gz → 2.0.0.dev1__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.

Potentially problematic release.


This version of aristaproto might be problematic. Click here for more details.

Files changed (57) hide show
  1. aristaproto-2.0.0.dev1/PKG-INFO +26 -0
  2. aristaproto-2.0.0.dev1/pyproject.toml +142 -0
  3. aristaproto-2.0.0.dev1/src/aristaproto/__init__.py +1322 -0
  4. aristaproto-2.0.0.dev1/src/aristaproto/_types.py +21 -0
  5. aristaproto-2.0.0.dev1/src/aristaproto/_version.py +38 -0
  6. {aristaproto-0.1.4 → aristaproto-2.0.0.dev1}/src/aristaproto/casing.py +2 -3
  7. aristaproto-2.0.0.dev1/src/aristaproto/enum_.py +71 -0
  8. aristaproto-2.0.0.dev1/src/aristaproto/grpcio/__init__.py +2 -0
  9. aristaproto-2.0.0.dev1/src/aristaproto/grpcio/grpcio_async_client.py +342 -0
  10. aristaproto-2.0.0.dev1/src/aristaproto/grpcio/grpcio_async_server.py +157 -0
  11. aristaproto-2.0.0.dev1/src/aristaproto/grpclib/__init__.py +2 -0
  12. {aristaproto-0.1.4/src/aristaproto/grpc → aristaproto-2.0.0.dev1/src/aristaproto/grpclib}/grpclib_client.py +25 -41
  13. {aristaproto-0.1.4/src/aristaproto/grpc → aristaproto-2.0.0.dev1/src/aristaproto/grpclib}/grpclib_server.py +1 -2
  14. aristaproto-2.0.0.dev1/src/aristaproto/message_pool.py +32 -0
  15. aristaproto-2.0.0.dev1/src/aristaproto/nano_datetime.py +161 -0
  16. aristaproto-2.0.0.dev1/src/aristaproto/utils.py +44 -0
  17. aristaproto-2.0.0.dev1/src/aristaproto/validators/__init__.py +3 -0
  18. aristaproto-2.0.0.dev1/src/aristaproto/validators/proto_types.py +30 -0
  19. aristaproto-0.1.4/LICENSE.md +0 -23
  20. aristaproto-0.1.4/PKG-INFO +0 -539
  21. aristaproto-0.1.4/README.md +0 -510
  22. aristaproto-0.1.4/pyproject.toml +0 -165
  23. aristaproto-0.1.4/src/aristaproto/__init__.py +0 -2059
  24. aristaproto-0.1.4/src/aristaproto/_types.py +0 -14
  25. aristaproto-0.1.4/src/aristaproto/_version.py +0 -4
  26. aristaproto-0.1.4/src/aristaproto/compile/__init__.py +0 -0
  27. aristaproto-0.1.4/src/aristaproto/compile/importing.py +0 -183
  28. aristaproto-0.1.4/src/aristaproto/compile/naming.py +0 -21
  29. aristaproto-0.1.4/src/aristaproto/enum.py +0 -197
  30. aristaproto-0.1.4/src/aristaproto/grpc/__init__.py +0 -0
  31. aristaproto-0.1.4/src/aristaproto/grpc/util/__init__.py +0 -0
  32. aristaproto-0.1.4/src/aristaproto/grpc/util/async_channel.py +0 -193
  33. aristaproto-0.1.4/src/aristaproto/lib/__init__.py +0 -0
  34. aristaproto-0.1.4/src/aristaproto/lib/google/__init__.py +0 -0
  35. aristaproto-0.1.4/src/aristaproto/lib/google/protobuf/__init__.py +0 -1
  36. aristaproto-0.1.4/src/aristaproto/lib/google/protobuf/compiler/__init__.py +0 -1
  37. aristaproto-0.1.4/src/aristaproto/lib/pydantic/__init__.py +0 -0
  38. aristaproto-0.1.4/src/aristaproto/lib/pydantic/google/__init__.py +0 -0
  39. aristaproto-0.1.4/src/aristaproto/lib/pydantic/google/protobuf/__init__.py +0 -2673
  40. aristaproto-0.1.4/src/aristaproto/lib/pydantic/google/protobuf/compiler/__init__.py +0 -210
  41. aristaproto-0.1.4/src/aristaproto/lib/std/__init__.py +0 -0
  42. aristaproto-0.1.4/src/aristaproto/lib/std/google/__init__.py +0 -0
  43. aristaproto-0.1.4/src/aristaproto/lib/std/google/protobuf/__init__.py +0 -2526
  44. aristaproto-0.1.4/src/aristaproto/lib/std/google/protobuf/compiler/__init__.py +0 -198
  45. aristaproto-0.1.4/src/aristaproto/plugin/__init__.py +0 -1
  46. aristaproto-0.1.4/src/aristaproto/plugin/__main__.py +0 -4
  47. aristaproto-0.1.4/src/aristaproto/plugin/compiler.py +0 -64
  48. aristaproto-0.1.4/src/aristaproto/plugin/main.py +0 -51
  49. aristaproto-0.1.4/src/aristaproto/plugin/models.py +0 -786
  50. aristaproto-0.1.4/src/aristaproto/plugin/module_validation.py +0 -167
  51. aristaproto-0.1.4/src/aristaproto/plugin/parser.py +0 -268
  52. aristaproto-0.1.4/src/aristaproto/plugin/plugin.bat +0 -2
  53. aristaproto-0.1.4/src/aristaproto/plugin/typing_compiler.py +0 -173
  54. aristaproto-0.1.4/src/aristaproto/templates/header.py.j2 +0 -57
  55. aristaproto-0.1.4/src/aristaproto/templates/template.py.j2 +0 -218
  56. aristaproto-0.1.4/src/aristaproto/utils.py +0 -56
  57. {aristaproto-0.1.4 → aristaproto-2.0.0.dev1}/src/aristaproto/py.typed +0 -0
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.4
2
+ Name: aristaproto
3
+ Version: 2.0.0.dev1
4
+ Summary: Arista Protobuf / Python gRPC bindings generator & library
5
+ Keywords: protobuf,gRPC
6
+ Author: Arista Networks, Adrien Vannson, Daniel G. Taylor
7
+ Author-email: Arista Networks <ansible@arista.com>, Adrien Vannson <adrien.vannson@protonmail.com>, Daniel G. Taylor <danielgtaylor@gmail.com>
8
+ License-Expression: MIT
9
+ Requires-Dist: python-dateutil>=2.9.0.post0
10
+ Requires-Dist: typing-extensions>=4.14.0
11
+ Requires-Dist: grpclib>=0.4.8 ; extra == 'all'
12
+ Requires-Dist: grpcio>=1.72.1 ; extra == 'all'
13
+ Requires-Dist: pydantic>=2.11.5 ; extra == 'all'
14
+ Requires-Dist: protobuf>=5.29.3 ; extra == 'all'
15
+ Requires-Dist: grpcio>=1.72.1 ; extra == 'grpcio'
16
+ Requires-Dist: grpclib>=0.4.8 ; extra == 'grpclib'
17
+ Requires-Dist: protobuf>=5.29.3 ; extra == 'protobuf'
18
+ Requires-Dist: pydantic>=2.11.5 ; extra == 'pydantic'
19
+ Requires-Python: >=3.10, <4.0
20
+ Project-URL: Documentation, https://aristanetworks.github.io/python-aristaproto
21
+ Project-URL: Repository, https://github.com/aristanetworks/python-aristaproto
22
+ Provides-Extra: all
23
+ Provides-Extra: grpcio
24
+ Provides-Extra: grpclib
25
+ Provides-Extra: protobuf
26
+ Provides-Extra: pydantic
@@ -0,0 +1,142 @@
1
+ [project]
2
+ name = "aristaproto"
3
+ version = "2.0.0.dev1"
4
+ description = "Arista Protobuf / Python gRPC bindings generator & library"
5
+ authors = [
6
+ { name = "Arista Networks", email = "ansible@arista.com" },
7
+ { name = "Adrien Vannson", email = "adrien.vannson@protonmail.com" },
8
+ { name = "Daniel G. Taylor", email = "danielgtaylor@gmail.com" },
9
+ ]
10
+ keywords = ["protobuf", "gRPC"]
11
+ license = "MIT"
12
+ requires-python = ">=3.10,<4.0"
13
+ dependencies = ["python-dateutil>=2.9.0.post0", "typing-extensions>=4.14.0"]
14
+
15
+ [project.urls]
16
+ Documentation = "https://aristanetworks.github.io/python-aristaproto"
17
+ Repository = "https://github.com/aristanetworks/python-aristaproto"
18
+
19
+ [project.optional-dependencies]
20
+ grpcio = ["grpcio>=1.72.1"]
21
+ grpclib = ["grpclib>=0.4.8"]
22
+ pydantic = ["pydantic>=2.11.5"]
23
+ protobuf = ["protobuf>=5.29.3"]
24
+ all = [
25
+ "grpclib>=0.4.8",
26
+ "grpcio>=1.72.1",
27
+ "pydantic>=2.11.5",
28
+ "protobuf>=5.29.3",
29
+ ]
30
+
31
+ [dependency-groups]
32
+ dev = [
33
+ "ipykernel>=6.29.5",
34
+ "mkdocs-material>=9.6.14",
35
+ "mkdocstrings[python]>=0.29.1",
36
+ "pre-commit>=4.2.0,<5",
37
+ "pyright>=1.1.401",
38
+ # The Ruff version is pinned. To update it, also update it in .pre-commit-config.yaml
39
+ "ruff==0.14.2",
40
+ ]
41
+ test = [
42
+ "cachelib>=0.13.0",
43
+ "poethepoet>=0.34.0",
44
+ "pytest>=8.4.0",
45
+ "pytest-asyncio>=1.0.0",
46
+ "pytest-cov>=6.1.1",
47
+ "pytest-mock>=3.14.1",
48
+ ]
49
+
50
+ [tool.uv]
51
+ package = true
52
+ default-groups = "all"
53
+
54
+ [build-system]
55
+ requires = ["uv_build>=0.9.7,<0.12"]
56
+ build-backend = "uv_build"
57
+
58
+ [tool.ruff]
59
+ extend-exclude = ["tests/outputs", "src/aristaproto/internal_lib"]
60
+ target-version = "py310"
61
+ line-length = 120
62
+
63
+ [tool.ruff.lint]
64
+ select = [
65
+ "F401", # Unused imports
66
+ "F841", # Unused local variables
67
+ "F821", # Undefined names
68
+ "E501", # Line length violations
69
+
70
+ "SIM101", # Simplify unnecessary if-else blocks
71
+ "SIM102", # Simplify return or yield statements
72
+ "SIM103", # Simplify list/set/dict comprehensions
73
+
74
+ "UP",
75
+
76
+ "I",
77
+ ]
78
+
79
+
80
+ [tool.ruff.lint.isort]
81
+ combine-as-imports = true
82
+ known-first-party = ["tests"]
83
+ known-third-party = ["grpclib", "pydantic", "google"]
84
+
85
+ [tool.pytest.ini_options]
86
+ python_files = "test_*.py"
87
+ python_classes = ""
88
+ norecursedirs = "**/output_*"
89
+ addopts = "-p no:warnings"
90
+
91
+ # Dev workflow tasks
92
+ [tool.poe.tasks.get-local-compiled-tests]
93
+ # task useful for local development. Copies the compiled test files from the compiler folder to the tests folder
94
+ shell = "rm -rf tests/outputs* && cp -r ../aristaproto_compiler/tests/outputs tests"
95
+
96
+ [tool.poe.tasks.test]
97
+ cmd = "pytest"
98
+ help = "Run tests"
99
+
100
+ [tool.poe.tasks.test-cov]
101
+ cmd = "pytest --cov=aristaproto --cov-report=term --cov-report=html tests/"
102
+ help = "Run tests with code coverage report"
103
+
104
+ [tool.poe.tasks.typecheck]
105
+ cmd = "pyright src"
106
+ help = "Typecheck the code with Pyright"
107
+
108
+ [tool.poe.tasks.format]
109
+ sequence = ["_format", "_sort-imports"]
110
+ help = "Format the source code, and sort the imports"
111
+
112
+ [tool.poe.tasks.check]
113
+ sequence = ["_check-format", "_check"]
114
+ help = "Check that the source code is formatted and the imports sorted"
115
+
116
+ [tool.poe.tasks._format]
117
+ cmd = "ruff format src tests"
118
+ help = "Format the source code without sorting the imports"
119
+
120
+ [tool.poe.tasks._sort-imports]
121
+ cmd = "ruff check --select I --fix src tests"
122
+ help = "Sort the imports"
123
+
124
+ [tool.poe.tasks._check-format]
125
+ cmd = "ruff format --diff src tests"
126
+ help = "Check that the source code is formatted"
127
+
128
+ [tool.poe.tasks._check]
129
+ cmd = "ruff check src tests"
130
+ help = "Check the code"
131
+
132
+ [tool.poe.tasks.clean]
133
+ cmd = """
134
+ rm -rf .coverage .mypy_cache .pytest_cache
135
+ dist aristaproto.egg-info **/__pycache__
136
+ testsoutput_*
137
+ """
138
+ help = "Clean out generated files from the workspace"
139
+
140
+ [tool.poe.tasks.serve-docs]
141
+ cmd = "mkdocs serve"
142
+ help = "Serve the documentation locally"