Skip to main content

genropy-kajenn

Serve legacy (synchronous) genropy sites on an ASGI server — no register daemon. genropy-kajenn is the genropy-specific bridge on top of kajenn and kajenn-orchestra: kajenn is the ASGI server, kajenn-orchestra the commander/worker orchestration, and this package hosts an unmodified GnrWsgiSite on top of them, spreading its users over a supervised pool of worker processes, each user pinned to one of them.

What it replaces

  • gnrwsgiserve (werkzeug/WSGI) → gnrkajenn (uvicorn/ASGI). Same site, same options, unmodified code.
  • The register daemon (Pyro4, then genro-nodaemon) → an in-process register. There is no daemon to start or connect to.

Installation

pip install genropy-kajenn

Latest development version, straight from GitHub:

pip install git+https://github.com/genropy/genropy-kajenn.git

kajenn and kajenn-orchestra are installed automatically. genropy must be present at runtime (the worker runs a GnrWsgiSite) and configured as usual (~/.gnr/environment.xml plus an existing site). genropy is not a declared dependency of this package.

Usage

gnrkajenn mysite -p 8080
# site on http://127.0.0.1:8080/index

mysite is the genropy instance name — the same you pass to gnrwsgiserve — or a path to a site directory. That is the whole launch: there is no worker count to declare and no single/pool selector. The pool always runs, starts with one worker and adds another when the ones it has have no room for a newcomer.

On macOS export PGGSSENCMODE=disable: the workers are born by fork and libpq negotiating Kerberos inside a forked child crashes it.

Watch the site-wide counters, no authentication needed:

curl -s http://127.0.0.1:8080/metrics

How it works

A genropy site is synchronous WSGI. genropy-kajenn converts each ASGI request to a PEP 3333 environ and runs the site on a thread pool, so the event loop is never blocked. The site's register — connections, pages, sessions, datachanges, stores — is served in-process, not by a daemon: the package declares the gnr.web:daemon entry point, and genropy resolves its daemon namespace to it only when GNR_DAEMON_PROVIDER names the provider, which the CLI does for its own process. The choice is per process, so the classic stack and this one can share one virtualenv.

  • Every user lives in one worker, with all his pages. Routing is by identity: the spa_connection_id cookie carries the connection id the site itself minted while serving, and the commander knows whose it is.
  • Workers are born by fork out of a template process that builds the GnrWsgiSite once for all of them, so starting one more costs a fork and not a cold start.
  • The pool sizes itself on measured occupancy — the number of processes is a reading, never a setting. KAJENN_WORKER_MAX_USERS caps how many users one worker may hold.
  • A quiet user is frozen to disk and his worker gets the memory back; his next request wakes him. A restart parks everybody the same way, so nobody is logged out by it.
  • Changes travel addressed: what one page writes, or a table event, reaches the pages that subscribed it, wherever they sit. The desk that files them and the table index live in this package, on the bridge's commander (genropy/genro-asgi#59). The legacy globalStore() is one master on the commander with no replicas — a worker reads it with a call and writes it through an all-or-nothing grant.

See docs/ for the pool, configuration, CLI reference, FAQ, troubleshooting — and docs/status.rst for what is built today.

Documentation

The documentation is built with Sphinx:

pip install -e .[docs]
cd docs && make html
# open docs/_build/html/index.html

Development

pip install -e .[dev]
pytest tests/
ruff check src/

License

Apache License 2.0 — Copyright 2025 Softwell S.r.l. See LICENSE and NOTICE.

Metadata

Release files for genropy-kajenn 0.1.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 genropy-kajenn 0.1.0
File Size Uploaded
genropy_kajenn-0.1.0.tar.gz 500.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for genropy-kajenn 0.1.0
File Interpreter ABI Platform
genropy_kajenn-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 583.8 kB

Release files / genropy_kajenn-0.1.0.tar.gz

Download URL genropy_kajenn-0.1.0.tar.gz
Size 500.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b2ce9d7a2ef13dcffd3188e0451f7b80d500936c5c092a40525a28daecc56fa4
BLAKE2b-256 checksum
How to use checksums
9299af01ca3dbc26784523d3d151396af226b56417e5377799a78336ced0a261
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 Sep 18, 2026.

Transparency log

Release files / genropy_kajenn-0.1.0-py3-none-any.whl

Download URL genropy_kajenn-0.1.0-py3-none-any.whl
Size 83.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b93079a824698ac83c3617c7f43ae9fae872f63c680c570a96e8d1612ab4311
BLAKE2b-256 checksum
How to use checksums
d9ef606046ea180966b24b91341191bd539baf41f48df4e6037063bfaafba20e
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 Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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