Metadata-Version: 2.4
Name: nebulabroadcast-core
Version: 6.1.6
Summary: Async domain library of the Nebula broadcast automation system
Author: Nebula Broadcast
Author-email: Nebula Broadcast <info@nebulabroadcast.com>
License-Expression: GPL-3.0-or-later
Classifier: Framework :: AsyncIO
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Dist: aiofiles>=25.1.0
Requires-Dist: asyncpg>=0.31.0
Requires-Dist: httpx2>=2.16.0
Requires-Dist: jinja2>=3.1.6
Requires-Dist: mistune>=3.2.0
Requires-Dist: nx-framework[postgres,redis]>=0.0.9
Requires-Dist: pydantic>=2.12.5
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: unidecode>=1.4.0
Requires-Python: >=3.14
Project-URL: Homepage, https://nebulabroadcast.com
Project-URL: Documentation, https://docs.nebulabroadcast.com
Project-URL: Source, https://github.com/nebulabroadcast/nebula
Description-Content-Type: text/markdown

# nebulabroadcast-core

The async domain library of [Nebula](https://nebulabroadcast.com), the open
source broadcast automation system: assets, rundown objects, users,
settings, queries, messaging, database and redis access. It is the
`nebula` package the Nebula server is built on, published so that
stand-alone services can work with a Nebula site the same way the server
does.

```
pip install nebulabroadcast-core==6.1.6
```

Use the version of the server your site runs: the package is released
with every server release and they share the version number.

## Example

```python
import nebula


async def main() -> None:
    async for asset in nebula.Asset.iterate(
        filter={"key": "id_folder", "op": "in", "value": [1]},
        sort=["title"],
    ):
        print(asset.id, asset["title"])


nebula.run(main())
```

`nebula.run()` loads the site settings from the database and runs the
coroutine. Code run this way acts as the system: no user, no access
restrictions.

## Configuration

The same environment variables as the server (a `.env` file is read too):

| Variable | Default |
|---|---|
| `NEBULA_POSTGRES_URL` | `postgresql://nebula:nebula@postgres:5432/nebula` |
| `NEBULA_REDIS_URL` | `redis://redis:6379/0` |
| `NEBULA_SITE_NAME` | `nebula` |
| `NEBULA_LOG_LEVEL` | `DEBUG` |

## Supported API

The names exported by `nebula` itself (`nebula.Asset`, `nebula.User`,
`nebula.Item`, `nebula.Bin`, `nebula.Event`, `nebula.settings`,
`nebula.db`, `nebula.redis`, `nebula.msg`, `nebula.run`, the exceptions...)
and `nebula.query`. Everything else (`nebula.helpers`, submodules) is
internal and may change in any release.

This is not the synchronous `nebula` package of
[nebula-worker](https://github.com/nebulabroadcast/nebula-worker). Both
are imported as `nebula`, so they can't be installed in the same
environment.

## License

GPL-3.0-or-later
