semvec/pypi-packages huggingface dataset:
sphinx-terminal 1.0.3
A Sphinx extension for rendering terminal input and output.
Requires Python: >=3.10

# sphinx-terminal

sphinx-terminal allows you to display terminal input and output in your Sphinx
documentation.

## Basic usage

To display terminal input and output in your Sphinx document, use the `terminal`
directive, providing input and output as follows:

```
.. terminal::

    input

    output
```

Input can span multiple lines, as long as the lines are in the same paragraph.
Everything after the first blank line in the directive's body is rendered as output.

The prompt defaults to `user@host:~$`. To customize this, use the `:user:`, `:host:`,
and `:dir:` options.

```
.. terminal::
    :user: author
    :host: canonical
    :dir: ~/path

    echo 'hello'

    hello
```

To render only the output of a command, include the `:output-only:` flag in the
directive's options.

```
.. terminal::
    :output-only:

    This is rendered as output.
```

To enable a copy button for users, include the `:copy:` flag as a directive option.
Only the input can be copied.

```
.. terminal::
    :copy:

    echo 'hello'

    hello
```

Similarly, to make the output scrollable, include the `:scroll:` flag as a directive
option.

```
.. terminal::
    :scroll:

    echo 'hello'

    hello
```

## Project setup

sphinx-terminal is published on PyPI and can be installed with:

```bash
pip install sphinx-terminal
```

After adding sphinx-terminal to your Python project, update Sphinx's conf.py file to
include sphinx-terminal as one of its extensions:

```python
extensions = [
    "sphinx_terminal"
]
```

The copy button functionality depends on
[sphinx-copybutton](https://sphinx-copybutton.readthedocs.io/en/latest/).
sphinx-terminal automatically adds this extension to your Sphinx project and configures
it to copy terminal input and ignore the multiline prompt.

```python
copybutton_selector = "span.copybutton, div:not(.terminal-code) > div.highlight > pre"
copybutton_prompt_text = "> |"
copybutton_prompt_is_regexp = True
```

Customizing these configurations in your conf.py file overrides the defaults assigned by
sphinx-terminal.

## Community and support

You can report any issues or bugs on the project's [GitHub
repository](https://github.com/canonical/sphinx-terminal).

If you're interested in contributing, start with the [contribution
guide](https://github.com/canonical/sphinx-terminal/blob/main/CONTRIBUTING.md).

sphinx-terminal is covered by the [Ubuntu Code of
Conduct](https://ubuntu.com/community/ethos/code-of-conduct).

## License and copyright

sphinx-terminal is released under the [GPL-3.0 license](LICENSE).

© 2025 Canonical Ltd.
bstk-notitia 0.6.8
notitia core runtime & modules
Requires Python: <4.0,>=3.11

# Notitia core - pluggable payload procesing - everything is famous.. sort of..

```python
import motor.motor_asyncio
from bstk_notitia import Notitia

# An Investigator looks for and specialises in dealing with particular types of cases
# Observers watch for information that may or may not be useful to an investigator
# Informants provide new or supporting information upon request by the investigator
# Reporters are used by the investigator to disseminate information and receive feedback

# Only certain cases get investigated
# The investigator decides what cases to take
# Each case must run to completion, even if completion means new cases are created

motor_client = motor.motor_tornado.AsyncIOMotorClient(host=['localhost:27017'])

notitia = Notita(
    department="08e32fd8-9259-4a3e-891a-bc39b7c8ef22", # [str | None] - for tenancy isolation
)

notitia.set_driver(
    driver="mongodb"
    driver_settings={
        "async_client": motor_client,
        "database": 'myappdb',
        "collection_prefix": "bn_",
        "archive_suffix": "_arch",
        "completion_action": "immoliate",
    },
)

notitia.enlist(investigator="portaone/espf")

espf_payload = {
    "event-type": "Test/Event",
    "variables": {
        "i_event": 1,
        "i_account": 999
    }
}

# A valid case
try:
    case = await notitia.dispatch(
        observer="portaone/espf",
        information=espf_payload,
        completion_action="archive". # [archive | immoliate | None]
    )
    print(f"Tracking case as {case.number}")
except NotitiaInvalidCasePayloadException as ex:
    print(f"Invalid Payload: {ex.message}")

async for movement in notitia.spy(case):
    print(f"Case moved {movement.id}")


```