Wevr.Sdk
0.5.1
dotnet add package Wevr.Sdk --version 0.5.1
NuGet\Install-Package Wevr.Sdk -Version 0.5.1
<PackageReference Include="Wevr.Sdk" Version="0.5.1" />
<PackageVersion Include="Wevr.Sdk" Version="0.5.1" />
<PackageReference Include="Wevr.Sdk" />
paket add Wevr.Sdk --version 0.5.1
#r "nuget: Wevr.Sdk, 0.5.1"
#:package Wevr.Sdk@0.5.1
#addin nuget:?package=Wevr.Sdk&version=0.5.1
#tool nuget:?package=Wevr.Sdk&version=0.5.1
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
- Install the package on a host / container / region
- Set the same org
WEVR_LICENSE_KEY - Set a unique pair: name + type for that install
- Run traffic — envelopes land under
org_idwith deployment key{name}/{type} - 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
- Log in to the Weevir dashboard
- Open Settings — the license key is shown on the org card as
WEVR_LICENSE/license_key - Store it as
WEVR_LICENSE_KEY(env var / secrets manager). Do not putwk_…in dashboardtenantIdquery params — the API expects the resolvedorg_idUUID 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
- PyPI — create the project
wevr-sdk(or confirm the name is free). Add GitHub secretPYPI_API_TOKEN(Trusted Publishing is preferred). - npm — create the
@wevrorg (or change the package name injs/package.json). Add GitHub secretNPM_TOKENwith publish rights. Scoped packages need"publishConfig.access": "public"(already set). - NuGet — create
Wevr.Sdkon nuget.org. Add GitHub secretNUGET_API_KEY. - Confirm GitHub Actions can run on this private repo (Actions enabled).
Release
- Bump versions in
pyproject.toml,src/wevr/__init__.py,js/package.json, anddotnet/Directory.Build.propsso they match the tag. git tag sdk-v0.5.1 && git push origin sdk-v0.5.1- Workflow
.github/workflows/publish-sdk.ymltests, then publishes to PyPI, npm, and NuGet.
Customers never need GitHub access. Runtime access is still gated by wk_….
| Product | Versions 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. |
-
net8.0
- Npgsql (>= 8.0.6)
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 |