Skip to main content

notitia core runtime & modules

Project description

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

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}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bstk_notitia-0.6.8.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bstk_notitia-0.6.8-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file bstk_notitia-0.6.8.tar.gz.

File metadata

  • Download URL: bstk_notitia-0.6.8.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bstk_notitia-0.6.8.tar.gz
Algorithm Hash digest
SHA256 bb6cbc3cdcb85d075effbe8661cca35d93add1184117da880788159be21d2c7b
MD5 fc280c970370da2eca9be22f8d3762d6
BLAKE2b-256 d7e00f9a0f33b74e0ae7cd8e260cabe1cdd50af6df03a8f141d759898044dc9b

See more details on using hashes here.

File details

Details for the file bstk_notitia-0.6.8-py3-none-any.whl.

File metadata

  • Download URL: bstk_notitia-0.6.8-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bstk_notitia-0.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 eba3e806fc93fde3837ef6819db2462bf17d7d495e545063311292ce163c21c5
MD5 49fe66b1e33e009a5e20ea146b3df28b
BLAKE2b-256 06b92ee87f5c0f3e310d29510c4c158bea4f2e8cac6e76460c04152ab3fcd4a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page