Skip to main content

nself-plugin

Python plugin authoring SDK for nSelf. Parity with plugin-sdk-go v0.1.0.

Install

pip install nself-plugin

For database migrations:

pip install 'nself-plugin[db]'

Quick start

from nself_plugin import Plugin, PluginContext, HealthStatus

plugin = Plugin(name="my-notify", version="1.0.0")

@plugin.install
async def install(ctx: PluginContext) -> None:
    ctx.env.require(["SMTP_HOST", "SMTP_PORT"])

@plugin.start
async def start(ctx: PluginContext) -> None:
    app = ctx.http.create_app()
    app.post("/notify/send")(handler)
    await ctx.http.listen(ctx.port)

@plugin.health
async def health(ctx: PluginContext) -> HealthStatus:
    return await ctx.http.ping("/notify/healthz")

Scaffold a plugin

nself plugin new my-plugin --lang python

License

MIT

Metadata

Release files for nself-plugin-sdk 1.4.12

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

Source distribution (sdist)

Source distribution for nself-plugin-sdk 1.4.12
File Size Uploaded Provenance Actions
nself_plugin_sdk-1.4.12.tar.gz 10.5 kB Without provenance Details for nself_plugin_sdk-1.4.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nself-plugin-sdk 1.4.12
File Interpreter ABI Platform Actions
nself_plugin_sdk-1.4.12-py3-none-any.whl Python 3 none any Details for nself_plugin_sdk-1.4.12-py3-none-any.whl

Total release size: 21.7 kB

Release files / nself_plugin_sdk-1.4.12.tar.gz

Download URL nself_plugin_sdk-1.4.12.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cd32430d87e992f5ac96e01ff4efe7b26a8e6d9ca3e9551ea57c4a4c6c87891d
BLAKE2b-256 checksum
How to use checksums
bc5ffb5c42c2bab61d178f0bec2afb13494e30f522c3cf272f74d1f817c9153e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / nself_plugin_sdk-1.4.12-py3-none-any.whl

Download URL nself_plugin_sdk-1.4.12-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c44243a1652c95554c6c4f9226f424a3d33afeb6abacc70e2cfa4c78be2b97f5
BLAKE2b-256 checksum
How to use checksums
95edcfce8e717adb06851a718a0e1c4f888aa10d083ca70a88838cfd01b6710a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Security for nself-plugin-sdk 1.4.12

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.

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