Skip to main content

z4j-core

PyPI version Python License

The z4j domain core, shared models, protocols, transport, redaction, policy.

Pure-Python dependency for every z4j package. No framework / engine / database imports, so it can be vendored into agent processes without dragging server runtime weight. End users do not install this package directly; it ships as a transitive dependency of z4j or any agent package.

Compatibility

Python 3.11+. Pure-Python, no framework or database imports.

Full per-adapter matrix at https://z4j.dev/reference/compatibility/.

What's in here

  • Pydantic models, Task, Worker, Queue, Schedule, Event, Command, Agent, plus the wire-frame envelope types
  • Adapter protocols, QueueEngineAdapter, SchedulerAdapter, FrameworkAdapter. Every framework / engine / scheduler package implements one or more of these.
  • Wire protocol, frame definitions and the HMAC envelope used by z4j ↔ agent WebSocket transport (signed v2 protocol)
  • Redaction engine, scrubs values that match the built-in or operator-configured patterns from event payloads (URLs, headers, kwargs, exceptions) before they hit the brain
  • Policy helpers, role-based action enums and a pure policy engine for direct consumers. The brain enforces its API RBAC in its own domain layer.
  • Error hierarchy, shared exception classes so agents and brain agree on what counts as AuthorizationError vs NotFoundError vs ConflictError

Install

pip install z4j-core

End users normally get this as a transitive dependency. Direct installation is appropriate when you're building a custom adapter against the protocols.

Stability

The wire protocol is v=2; its frame models ignore additive fields. Product-version skew is narrower than the wire format alone, so upgrade the active z4j packages together according to the compatibility policy. Adapter interfaces are structural Python protocols; adding a method can therefore require coordinated adapter updates even when the wire format is unchanged.

Documentation

Full docs at z4j.dev/concepts/architecture/.

License

Apache-2.0, see LICENSE.

Dependency compatibility

The shared models support Pydantic 2.9.2+ on Python 3.11–3.13 and Pydantic 2.12+ on Python 3.14+, with typing-extensions>=4.12.2. The latter Python branch needs upstream Pydantic runtime/wheel support. Z4J's development lockfile selects the current reviewed versions; it does not force host applications onto those exact versions. Strict validation, redaction and wire-protocol tests run at the declared minimums as well as the current dependency profile.

Metadata

Release files for z4j-core 1.11.0

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

Source distribution (sdist)

Source distribution for z4j-core 1.11.0
File Size Uploaded
z4j_core-1.11.0.tar.gz 133.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for z4j-core 1.11.0
File Interpreter ABI Platform
z4j_core-1.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 248.4 kB

Release files / z4j_core-1.11.0.tar.gz

Download URL z4j_core-1.11.0.tar.gz
Size 133.6 kB
Tags Source
SHA-256 checksum
How to use checksums
35959613639408ce58e7c4f1876843ead7292e0128e183692feab92af20002d9
BLAKE2b-256 checksum
How to use checksums
50b7ff9b819240477bac5d81dbb18ceb0b341464c32c7a1dfe8c235e69968d11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / z4j_core-1.11.0-py3-none-any.whl

Download URL z4j_core-1.11.0-py3-none-any.whl
Size 114.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d1ae4276f857c791456709b3bff0e7a53198a3fdae31345a15a9c02964c5bf9
BLAKE2b-256 checksum
How to use checksums
6be25400a837d4b21ad815cb1543a765d9daa8d3e7325d25f2ffa216fb50fb53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.11.0 This release

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.7

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

1 release file

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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