Wevr.Sdk 0.5.1

dotnet add package Wevr.Sdk --version 0.5.1
                    
NuGet\Install-Package Wevr.Sdk -Version 0.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Wevr.Sdk" Version="0.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wevr.Sdk" Version="0.5.1" />
                    
Directory.Packages.props
<PackageReference Include="Wevr.Sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Wevr.Sdk --version 0.5.1
                    
#r "nuget: Wevr.Sdk, 0.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Wevr.Sdk@0.5.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Wevr.Sdk&version=0.5.1
                    
Install as a Cake Addin
#tool nuget:?package=Wevr.Sdk&version=0.5.1
                    
Install as a Cake Tool

Weevir SDK

Signal-based governance and telemetry connectors (wevr-sdk / @wevr/sdk-js / Wevr.Sdk).

The Weevir platform repo stays private. These packages are published to public registries so anyone with a license key can install and start sending traffic.

Install

# Python 3.9+  — core: Weevir Postgres sink, Postgres/PGVector, REST
pip install wevr-sdk
pip install "wevr-sdk[llm]"     # OpenRouter only (do not install if unused)
pip install "wevr-sdk[mongo]"   # MongoDB only (do not install if unused)

# JavaScript (Node 18+) — REST + OpenRouter use fetch (no extra LLM package)
npm install @wevr/sdk-js
npm install pg                  # only if using WevrPostgresSink

# .NET 8+ — REST + OpenRouter + WevrPostgresSink (Npgsql only)
dotnet add package Wevr.Sdk

Pin a version in production (wevr-sdk==0.5.1, @wevr/sdk-js@0.5.1, Wevr.Sdk 0.5.1).

Startup docs (Python + npm)

Each public package ships developer and coding-agent briefs. Print them after install:

# Python
wevr-advise start      # developers
wevr-advise agents     # coding agents

# JavaScript
npx wevr-advise start
npx wevr-advise agents
Audience Python (wevr-sdk) npm (@wevr/sdk-js)
Developers wevr/docs/GETTING_STARTED.md docs/GETTING_STARTED.md
Coding agents wevr/docs/AGENTS.md docs/AGENTS.md

Requirements

  • A Weevir license key (wk_…) for your organization — see Get your license key
  • Weevir governance Postgres (WEVR_PG_*)
  • Environment name + type on every process (no dashboard registration step)

Quick verify

import wevr
print(wevr.__version__)
import { EnvironmentType } from '@wevr/sdk-js';
console.log(EnvironmentType.PROD);
using Wevr.Sdk;
Console.WriteLine(WevrEnvironmentResolver.DeploymentKey("billing-api", EnvironmentType.PROD));

Connectors

Connector Sample Import Role
Weevir Postgres CONNECTOR_WEVR_POSTGRES.md Python: WevrPostgresConnector<br>JS/.NET: WevrPostgresSink Governance sink (envelopes + safeguard cache). Required by REST / OpenRouter / Mongo.
PostgreSQL CONNECTOR_POSTGRES.md wevr.connect.storage.postgres.PostgresConnector Governed target Postgres (execute) — Python
PGVector CONNECTOR_PGVECTOR.md wevr.connect.storage.vector.VectorPostgresConnector Postgres + pgvector inserts — Python
MongoDB CONNECTOR_MONGODB.md wevr.connect.storage.mongo.MongoDBConnector Governed MongoDB — Python (wevr-sdk[mongo])
REST API CONNECTOR_REST.md Python / JS / .NET RestApiConnector Governed HTTP client
OpenRouter (LLM) CONNECTOR_OPENROUTER.md Python / JS / .NET OpenRouter Governed LLM gateway

All consumer connectors emit telemetry through Weevir Postgres (WEVR_PG_*) and need your license key as tenant_id.

Initialise Weevir (required)

Field Env var Example
License key WEVR_LICENSE_KEY wk_…
Environment name WEVR_ENVIRONMENT_NAME billing-api
Environment type WEVR_ENVIRONMENT_TYPE PROD | QA | DEV | UAT

Missing name or type → connector init fails (no silent default).

import os
from wevr.connect.storage.postgres import WevrPostgresConnector
from wevr.connect.http.rest import RestApiConnector

wevr_pg = WevrPostgresConnector(tenant_id=os.getenv("WEVR_LICENSE_KEY"))
wevr_pg.connect()
rest = RestApiConnector(
    tenant_id=os.getenv("WEVR_LICENSE_KEY"),
    wevr_pg=wevr_pg,
    environment_name=os.getenv("WEVR_ENVIRONMENT_NAME"),
    environment_type=os.getenv("WEVR_ENVIRONMENT_TYPE"),
)
rest.connect()
import { RestApiConnector, WevrPostgresSink } from '@wevr/sdk-js';

const wevrPg = new WevrPostgresSink({ tenantId: process.env.WEVR_LICENSE_KEY });
const rest = new RestApiConnector({
  tenantId: process.env.WEVR_LICENSE_KEY,
  wevrPg,
  environment: {
    name: process.env.WEVR_ENVIRONMENT_NAME,
    type: process.env.WEVR_ENVIRONMENT_TYPE,
  },
});
await rest.connect();
using Wevr.Sdk;

await using var wevrPg = new WevrPostgresSink(new WevrPostgresSinkOptions
{
    TenantId = Environment.GetEnvironmentVariable("WEVR_LICENSE_KEY"),
});
await using var rest = new RestApiConnector(new RestApiConnectorOptions
{
    TenantId = Environment.GetEnvironmentVariable("WEVR_LICENSE_KEY"),
    WeevirPg = wevrPg,
    EnvironmentName = Environment.GetEnvironmentVariable("WEVR_ENVIRONMENT_NAME"),
    EnvironmentType = Environment.GetEnvironmentVariable("WEVR_ENVIRONMENT_TYPE"),
});
await rest.ConnectAsync();

How environments appear

  1. Install the package on a host / container / region
  2. Set the same org WEVR_LICENSE_KEY
  3. Set a unique pair: name + type for that install
  4. Run traffic — envelopes land under org_id with deployment key {name}/{type}
  5. Refresh the dashboard — the environment appears under filters, Environments, Settings, and live metrics
Concept Rule
Deployment key {name}/{type} lowercase, e.g. billing-api/prod
Isolation Same name + different type = different environments
Org scope Same license → one org; unlimited distinct name/type pairs (subject to plan)

Runtime environment variables

Variable Purpose
WEVR_LICENSE_KEY Org license (wk_…) — required
WEVR_ENVIRONMENT_NAME Deployment name (text) — required
WEVR_ENVIRONMENT_TYPE PROD / QA / DEV / UAT — required
WEVR_PG_HOST / PORT / USER / PASSWORD / DB Weevir governance Postgres
OPENROUTER_API_KEY OpenRouter LLM connector
PG_HOST / PORT / USER / PASSWORD / DB Target app Postgres (Python PostgresConnector)
MONGO_URI or MONGO_HOST / PORT / USER / PASSWORD / DB / COLLECTION Target MongoDB (Python)
WEVR_REST_BEARER_TOKEN / WEVR_REST_API_KEY Optional auth for RestApiConnector

Get your license key

  1. Log in to the Weevir dashboard
  2. Open Settings — the license key is shown on the org card as WEVR_LICENSE / license_key
  3. Store it as WEVR_LICENSE_KEY (env var / secrets manager). Do not put wk_… in dashboard tenantId query params — the API expects the resolved org_id UUID there.

Signup also returns org.license_key. One license key = one organization.

Package layout

Path Purpose
src/wevr/ Python SDK (pip install wevr-sdk)
js/ JavaScript SDK (npm install @wevr/sdk-js)
dotnet/Wevr.Sdk/ .NET SDK (dotnet add package Wevr.Sdk)
tests/ Python pytest suite
js/test/ Node test suite
dotnet/Wevr.Sdk.Tests/ xUnit suite

Local development (contributors)

From this folder (Weevir.SDK):

pip install -e ".[llm,mongo,test]"
cd js && npm test
dotnet test dotnet/Wevr.Sdk.Tests/Wevr.Sdk.Tests.csproj

Maintainers: publish

Platform source stays in the private GitHub repo. CI publishes only these three packages when you push a tag sdk-vX.Y.Z (for example sdk-v0.5.1).

One-time registry setup

  1. PyPI — create the project wevr-sdk (or confirm the name is free). Add GitHub secret PYPI_API_TOKEN (Trusted Publishing is preferred).
  2. npm — create the @wevr org (or change the package name in js/package.json). Add GitHub secret NPM_TOKEN with publish rights. Scoped packages need "publishConfig.access": "public" (already set).
  3. NuGet — create Wevr.Sdk on nuget.org. Add GitHub secret NUGET_API_KEY.
  4. Confirm GitHub Actions can run on this private repo (Actions enabled).

Release

  1. Bump versions in pyproject.toml, src/wevr/__init__.py, js/package.json, and dotnet/Directory.Build.props so they match the tag.
  2. git tag sdk-v0.5.1 && git push origin sdk-v0.5.1
  3. Workflow .github/workflows/publish-sdk.yml tests, then publishes to PyPI, npm, and NuGet.

Customers never need GitHub access. Runtime access is still gated by wk_….

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.1 100 8/27/2026