Metadata-Version: 2.4
Name: graphcore-kernel
Version: 0.1.0
Summary: GraphCore platform kernel (entities, strategies, transport, auth)
Author: GraphCore
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/graphcore-org/graphcore
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: Django<6,>=5.2
Requires-Dist: channels<5,>=4.2
Requires-Dist: celery<6,>=5.4
Requires-Dist: django-celery-beat<3,>=2.7
Requires-Dist: psycopg[binary,pool]<4,>=3.2
Requires-Dist: PyJWT[crypto]<3,>=2.9
Requires-Dist: django-cors-headers<5,>=4.4
Requires-Dist: jsonschema<5,>=4.23
Requires-Dist: mcp<3,>=2.3
Requires-Dist: daphne<5,>=4.1
Provides-Extra: redis
Requires-Dist: redis<9,>=8.1; extra == "redis"
Requires-Dist: django-redis<8,>=7.0; extra == "redis"
Requires-Dist: channels-redis<5,>=4.3; extra == "redis"
Provides-Extra: server
Requires-Dist: uvicorn[standard]<1,>=0.34; extra == "server"
Dynamic: license-file

# graphcore-kernel (backend)

Installable Django package (distributed as `graphcore-kernel`; the import
name stays `graphcore`). Pure platform library — entities, strategies,
executor, transport, auth. No CLI, no process supervisor, no templates.

```bash
cd kernel/backend
python3.14 -m venv .venv
source .venv/bin/activate
pip install -e ".[redis,server]"
```

For CLI + scaffolding, install the local monorepo packages together (nothing
is on PyPI yet):

```bash
# from local_dev/
pip install -e "graphcore/kernel/backend[redis,server]" \
            -e graphcore/distro/backend
```

## Public surface

App authors import from `graphcore.public.*`; everything else under
`graphcore.*` is internal and free to move.

```python
from graphcore.public.apps import GraphCoreAppConfig
from graphcore.public.entities import Entity, register_entity
from graphcore.public.strategies import SetAttributes, Strategy, register_strategy
from graphcore.public.auth.policy import AccessPolicy
from graphcore.public.auth.perms import Read, Write
```

`graphcore.public.apps` is imported while Django populates the app registry,
before models can be defined. `graphcore.public` is a namespace only, so that
import does not pull in `Entity`.

## Optional extras

Library-only installs of the kernel can omit these. The distro enables both
by default; generated projects can still use LocMem or another cache in
settings even when the Redis packages are installed.

| Extra | Adds | Needed for |
|---|---|---|
| `redis` | `redis`, `django-redis`, `channels-redis` | Redis-backed cache + channel layer |
| `server` | `uvicorn[standard]` | ASGI serving |

## Tests

From the monorepo root, with the shared Postgres running (`graphcore infra up`):

```bash
scripts/test                        # every suite on Postgres, database-dependent suites on SQLite
scripts/test graphcore.persistence  # narrow to a test label, on every database
```

See `.agents/skills/run-tests/SKILL.md` for the options.
