Skip to main content

This package contains the runtime for the Polywrap plugin system.

Quickstart

Imports

>>> from typing import Any, Dict, List, Union, Optional, cast
>>> from polywrap_manifest import AnyWrapManifest
>>> from polywrap_plugin import PluginModule
>>> from polywrap_core import InvokerClient, Uri

Define a plugin module

>>> class GreetingModule(PluginModule[None]):
...     def __init__(self, config: None):
...         super().__init__(config)
...
...     def greeting(self, args: Dict[str, Any], client: InvokerClient, env: Optional[Any] = None):
...         return f"Greetings from: {args['name']}"

Create a plugin wrapper

>>> greeting_module = GreetingModule(None)
>>> manifest = cast(AnyWrapManifest, NotImplemented)
>>> wrapper = PluginWrapper(greeting_module, manifest)

Invocation

>>> args = {
...     "name": "Joe"
... }
>>> result = wrapper.invoke(
...     uri=Uri.from_str("ens/greeting.eth"),
...     method="greeting",
...     args=args,
...     client=cast(InvokerClient, NotImplemented),
... )
>>> assert result.result == "Greetings from: Joe"

Metadata

Release files for polywrap-plugin 0.1.2

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

Source distribution (sdist)

Source distribution for polywrap-plugin 0.1.2
File Size Uploaded Provenance Actions
polywrap_plugin-0.1.2.tar.gz 4.1 kB Without provenance Details for polywrap_plugin-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for polywrap-plugin 0.1.2
File Interpreter ABI Platform Actions
polywrap_plugin-0.1.2-py3-none-any.whl Python 3 none any Details for polywrap_plugin-0.1.2-py3-none-any.whl

Total release size: 10.8 kB

Release files / polywrap_plugin-0.1.2.tar.gz

Download URL polywrap_plugin-0.1.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5428d3fb39613110178d85b181a3af21e3002d43138791e31de9edcbd2963d78
BLAKE2b-256 checksum
How to use checksums
af4fe0f2daadd3fcd004ecf82fdc1a92fc49a0ba7d849581621f123b6f9acfc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/5.15.0-1041-azure

Release files / polywrap_plugin-0.1.2-py3-none-any.whl

Download URL polywrap_plugin-0.1.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca5cffb6a779cfd0e7d88fa3fdcbc91576f39171c8a6f962a4ca71ca42eb6e96
BLAKE2b-256 checksum
How to use checksums
dc3a5c501865625f09a86fc3d6b3ef92c5a3c50d78e236f410d53e8067753762
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.12 Linux/5.15.0-1041-azure

Security for polywrap-plugin 0.1.2

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.1.2 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