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()
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.
Metadata
Release files for nocville 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nocville-0.2.1.tar.gz | 10.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nocville-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / nocville-0.2.1.tar.gz
| Download URL | nocville-0.2.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0e4b64ae85f093b6528cd853e16fa0653802ccfbf7b22e0935365b4da94f82f
|
|
BLAKE2b-256 checksum How to use checksums |
a9d88b2deb508eb479eac1ff7b4930d1455fa39d57470ef9ef4b1c24f00f803e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / nocville-0.2.1-py3-none-any.whl
| Download URL | nocville-0.2.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ef019d5353e077e6a6f510b7a71b57a2795c708d884405db84eca7dd2071f22
|
|
BLAKE2b-256 checksum How to use checksums |
ab3ef449d357fd4fdf082a064a845e9206472cd4811f0239e9acdc16bd9cc776
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logSecurity for nocville 0.2.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for nocville-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logA 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.