Metadata-Version: 2.4
Name: cordis-meta
Version: 0.1.0rc1
Summary: Meta-framework of spatiotemporal composability
Author: Shigma
Author-email: Shigma <shigma10826@gmail.com>
License-Expression: MIT
License-File: LICENSE
Requires-Dist: typing-extensions>=4.12
Maintainer: jukanntenn
Maintainer-email: jukanntenn <jukanntenn@outlook.com>
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# cordis-meta

A Python port of [cordis](https://github.com/cordiverse/cordis) core: a meta-framework of
spatiotemporal composability.

`cordis-meta` re-implements `packages/core` of the upstream repository in Python on top of
`asyncio`. It provides the plugin lifecycle, dependency injection and the event bus of cordis.
See [PORTING.md](PORTING.md) for the porting principles and the JS → Python mapping.

**cordis-meta is under active development. The API is not yet stable and may change without notice.**

## Installation

```bash
uv add cordis-meta
```

The distribution is named `cordis-meta` and imported as `cordis`.

## Usage

```python
import asyncio

from cordis import Context, Service


class Foo(Service):
    def __init__(self, ctx: Context, value: int) -> None:
        super().__init__(ctx, "foo")
        self.value = value


async def main() -> None:
    root = Context()
    await root.use(Foo, 1)
    print(root.foo.value)  # 1


asyncio.run(main())
```

## Development

```bash
uv sync --group dev
uv run pytest
uv run ruff check .
uv run ty check
```

See [docs/development.md](docs/development.md) for the full development guide and
[docs/deployment.md](docs/deployment.md) for building and publishing.

## License

[MIT](LICENSE)
