Skip to main content

UCam Protobuf Testing Library

This project contains a support library to enable projects using python code autogenerated from protobuf files to be more easily tested.

Currently it contains an auto-factory function supporting creating factory-boy factories from betterproto generated python code.

Usage

Install the library via pip:

pip install ucam-protobuf-testing

Then create a factory from a dataclass or betterproto message:

@dataclass
class A:
    a_text: str
    integer: int
    value: float


class MyEnum(Enum):
    option1 = 1
    option2 = 2


@dataclass
class B:
    related: A
    an_enum: MyEnum
    list_of_str: list[str]


AFactory = auto_factory(A)
BFactory = auto_factory(B)

Local Development

Install poetry via:

pipx install poetry
pipx inject poetry poethepoet[poetry_plugin]

Install dependencies via:

poetry install

Build the library via:

poetry build

Run the tests via:

poetry poe tox

Dependencies

To add a new dependency for the library:

poetry add {dependency}

To add a new development-time dependency, used only during testing:

poetry add -G dev {dependency}

To remove a dependency which is no longer needed:

poetry remove {dependency}

CI configuration

The project is configured with Gitlab AutoDevOps via Gitlab CI using the .gitlab-ci.yml file.

Metadata

Release files for ucam-protobuf-testing 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ucam-protobuf-testing 0.2.0
File Size Uploaded Provenance
ucam_protobuf_testing-0.2.0.tar.gz 4.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ucam-protobuf-testing 0.2.0
File Interpreter ABI Platform
ucam_protobuf_testing-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / ucam_protobuf_testing-0.2.0.tar.gz

Download URL ucam_protobuf_testing-0.2.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ec73544e3e5951a80f2fbf2ccc3e3c59ac1ecb078378b796ea1e62c6b828a303
BLAKE2b-256 checksum
How to use checksums
e7863a8947fdca80dae5718e3134e8dd1b1edfa61aa24e034920302b8b31328f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / ucam_protobuf_testing-0.2.0-py3-none-any.whl

Download URL ucam_protobuf_testing-0.2.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16cbdd515cb53453652530832de39140f3f9b74eaa60b43260846be13433181e
BLAKE2b-256 checksum
How to use checksums
f1eed63d36d34bb5a0bed2e8b936f4d2188e4b718c3d4d40214082d23a1a6118
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for ucam-protobuf-testing 0.2.0

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page