Api Reference¶
Functions¶
parse(msg)
¶
Parse a GCN Kafka message from a supported topic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
msg
|
Message
|
Kafka-style message object with |
required |
Returns:
| Type | Description |
|---|---|
Notice
|
Parsed notice model for the message topic. |
Raises:
| Type | Description |
|---|---|
UnsupportedTopicError
|
If the message topic is not supported. |
ParseError
|
If the topic-specific parser cannot parse or validate the message payload. |
FieldParseError
|
If a topic-specific parser cannot extract a required field from the message payload. |
Source code in gcn_parser/parse.py
supported_topics()
¶
Return a list of GCN Kafka supported topics.
Returns:
| Type | Description |
|---|---|
list[Topic]
|
List of supported topic enum members. The returned list can be passed directly to Kafka consumers that accept string-like topic values. |
Source code in gcn_parser/__init__.py
Classes¶
Topic
¶
Bases: StrEnum
GCN Kafka topics for which parsing is supported.
Source code in gcn_parser/topics.py
Exceptions¶
ParseError
¶
FieldParseError
¶
Bases: ParseError
Raised when a parser cannot extract a specific notice field.
UnsupportedTopicError
¶
Mission References¶
For mission-specific parser and schemas, see: