A previous release had provenance metadata, but this release does not. View details.
nocville
Python SDK for pushing status updates to Nocville.
Installation
pip install nocville
For async support:
pip install nocville[async]
Usage
Synchronous
from nocville import NocvilleClient, Status, Mood
client = NocvilleClient(
api_key="your-api-key",
service_id="my-service",
)
# Push a status update
response = client.push_status(
status=Status.HEALTHY,
mood=Mood.HAPPY,
message="All systems operational",
metrics={"cpu": 45, "memory": 60},
)
# Quick helpers
client.healthy("Everything is fine")
client.warning("High memory usage")
client.critical("Service down!")
Asynchronous
import asyncio
from nocville.client import AsyncNocvilleClient, Status
async def main():
client = AsyncNocvilleClient(
api_url="https://your-nocville-server.com",
api_key="your-api-key",
service_id="my-service",
)
response = await client.push_status(
status=Status.HEALTHY,
message="All systems operational",
)
asyncio.run(main())
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
api_key |
str | required | Team API key for authentication |
api_url |
str | https://nocville.com |
Nocville API URL (override for development) |
service_id |
str | required | The service ID this client represents |
timeout |
float | 5.0 | Request timeout in seconds |
retries |
int | 3 | Number of retry attempts on failure |
retry_delay |
float | 1.0 | Base delay between retries in seconds |
debug |
bool | False | Enable debug logging |
Status Values
Status.HEALTHY- Service is operating normallyStatus.WARNING- Service has non-critical issuesStatus.CRITICAL- Service has critical issuesStatus.UNKNOWN- Service status cannot be determined
Mood Values
Mood.HAPPY- NPC appears happyMood.CONCERNED- NPC appears concernedMood.STRESSED- NPC appears stressedMood.IDLE- NPC appears neutral
License
MIT
Maps, AI coworkers and shutdown
Both clients accept map="Ops" (map name or ID) and the same keyword-only status fields:
from nocville import NocvilleClient, BehaviorHints, CompanionSpec
client = NocvilleClient(api_key="your-api-key", service_id="build-agent", map="Ops")
behavior: BehaviorHints = {"activity": "busy", "busy": "seek-desk"}
companion: CompanionSpec = {
"screenType": "desk-sign",
"placement": "on-desk",
"size": {"w": 3, "h": 1},
"label": "checkout-api",
}
try:
client.push_status(
"healthy", name="Claude", message="Running tests",
behavior=behavior, companion=companion,
appearance={"family": "claude"},
agent_stats={"added": 12, "removed": 3},
)
finally:
client.shutdown()
behavior["activity"] is optional (it is derived from status/mood when omitted). busy and
critical move the NPC to its busy target (desk, seek-companion device or equipment);
idle follows the idle hint; waiting freezes the NPC wherever it stands with a raised
hand and never walks it anywhere. Reserve waiting for "blocked on a human"; send busy
for a degraded (warning) service so it stays at its device.
agent_stats becomes agentStats on the wire. Behavior and companion dictionaries use
API camelCase keys. offline=True immediately removes the NPC. shutdown() stops and
drains heartbeats before sending an unknown/idle/offline sentinel, and returns a
PushResponse; use await client.shutdown() for AsyncNocvilleClient.
auto_offline=True opts into a best-effort interpreter-exit callback (default False).
For async clients this callback uses a synchronous request because the event loop may
already be closed. Prefer explicit shutdown in finally; exit callbacks cannot run after
SIGKILL or a crash. Python 3.9 or newer is required.
Silly office characters
The BehaviorHints type supports the built-in office routines. Use matching kind and
behavior.role values so the character also gets the right appearance:
client.push_status(
"healthy",
kind="office-cat",
behavior={"role": "office-cat", "activity": "idle"},
)
Keep sending heartbeats while the character should stay in the office. Available roles are
receptionist, security, janitor, barista, office-cat, office-dog,
plant-caretaker, it-technician, out-of-touch-executive, and slightly-inappropriate-hr. The Nocville server runs
movement and dialogue; it must be updated to support these routines. For ready-made CLI
processes, use the @nocville/npc npm package.
Encrypted Cloudflare workspaces
Run nocville-bridge from the @nocville/node package on the same machine, using
the team's verified workspace bundle and upstream API key. Then:
client = NocvilleClient.from_bridge(
"/home/me/.config/nocville/bridge.json.client.json", "my-service"
)
client.healthy("Everything is fine")
AsyncNocvilleClient.from_bridge supports the same configuration. The client file
contains a local bridge token, not the Cloudflare API key. Status and incident
operations are encrypted in the local bridge before they leave the machine.
Loopback requests bypass environment HTTP proxies and do not follow redirects.
Direct Cloudflare team keys are rejected to prevent accidental plaintext delivery.
Protect both the bridge's configuration and its producer profiles.
Metadata
Release files for nocville 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nocville-0.4.0.tar.gz | 13.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nocville-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.9 kB
Release files / nocville-0.4.0.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | nocville-0.4.0.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
015c4a95b4543c1caf2eb44b41e19d5adff023f83419a21a00b0ff9b07df9892
|
|
BLAKE2b-256 checksum How to use checksums |
8d4376ac37dbabb893a831425bbee39d7a6a703821cbbd5a21fb231d725c4a04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / nocville-0.4.0-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | nocville-0.4.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd0f56e3c324fffe78c39801a4822d0942ebd7606acbc1df72f3198bce07f408
|
|
BLAKE2b-256 checksum How to use checksums |
2f8a1dd456763e22e836c3a2bc4e4aef15247b964f79c65a13a3f71e04664475
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Security for nocville 0.4.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.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.3.0 2 files With provenance
- Added 0.4.0 2 files Without provenance
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.