Protoplasm
Utilities for working with Protobuf & gRPC in Python, e.g; compiling Python 3 Dataclasses from compiled proto-message-python code and casting between the two, quickly initializing large/nested Protobuf object, simplifying gRPC service interfaces etc.
IMPORTANT
Update this README file after moving from CCP's internal code repo to Github.
Protoplasm 4
- Unify the unary functionality of Protoplasm 2 with the streaming
functionality of Protoplasm 3
- The two turn out to be completely incompatible and API shattering
- Protoplasm 4 must incorporate BOTH functionalities wile being backwards compatible enough for both Protoplasm 2 and 3 projects to be able to migrate to 4
- The key here is detecting the
streamkeyword in protos that denote streaming input and/or output
- Add piled up functionality/utility/QoL improvements/bugs that's been on The
List™ for a while
- Cast to/from base64 encoded strings
- Utilize the
__all__directive to isolateimport *side effects - Integrate the Neobuf Builder CLI (from various other projects) into Protoplasm and generalize it
- Address the "
Noneis default value" issue - Explore the pros/cons of making non-existing Message/Object attributes
return
EmptyorEmptyDictto simplify nested attribute fetching...?
- Refactor and restructure the package properly
- Separate the 4 main roles of the package logically
- Cross-piling
*.prototo*_pb2.pyand*_pb2_grpc.py - Cross-piling
*_pb2.pyto*_dc.pyNeobuf Dataclasses - Generating
*_api.pyinterfaces - Generating gRPC implementation of Services
- Cross-piling
- Separate the 4 main roles of the package logically
Troubleshooting
- I get
TypeError: Plain typing.NoReturn is not valid as type argument- Upgrade to Python 3.9. This TypeError arises from a bug in Python 3.7
Clever bits to document...
- Code Generation (e.g.
foo.proto) + how to build- Dataclasses ->
foo_dc.py+ how to use (+ DataclassBase freebies)- Extending Dataclasses (a no-no for pb2 files apparently)
- Service API ->
foo_api.py+ how to use and implement- Automatic parameter unpacking
- Return value packing
- Raising
protoplasm.errors.api.*on errors or non-ok returns - Using
protoplasm.decoratorsfor param and type checking - The
takes_contextdecorator and how to use it
- GRPC DC Service Servicer ->
foo_dc_grpc.py+ how to use
- Dataclasses ->
- Utilities
- Proto <-> dict <-> Dataclass casters
- The
mkprotoandmkdataclasshelpers - The
unpack_dataclass_requestandpack_dataclass_responsehelpers
Metadata
Release files for protoplasm 5.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| protoplasm-5.3.1.tar.gz | 45.6 kB | Without provenance | Details for protoplasm-5.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| protoplasm-5.3.1-py3-none-any.whl | Python 3 | none | any | Details for protoplasm-5.3.1-py3-none-any.whl |
Total release size: 81.2 kB
Release files / protoplasm-5.3.1.tar.gz
| Download URL | protoplasm-5.3.1.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e142eafda1a8eca651f6f661d4c5e18be09fb6a559b4da8fab66144a6d49b1f5
|
|
BLAKE2b-256 checksum How to use checksums |
d39831b0d2774c7113c0a1008422a28d365efc5be0b6e8c036aff50b86e74672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / protoplasm-5.3.1-py3-none-any.whl
| Download URL | protoplasm-5.3.1-py3-none-any.whl |
|---|---|
| Size | 35.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e113e1a42031ee9e995b5a3342359670c8f03748c7feb19bf1e622070f509daa
|
|
BLAKE2b-256 checksum How to use checksums |
11a3db697e7eb27fc6deac5471ae69e75cd2afa0e245c309e1f33fc904eb610e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for protoplasm 5.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.