Skip to main content

Message Mediator.

Project description

sirji-messages

sirji-messages is a Python package.

Installation

Install sirji-messages quickly with pip:

pip install sirji-messages

Usages

Message Parser

from sirji_messages import message_parse

message_str ="""```
FROM: CODER
TO: USER
ACTION: INFORM
DETAILS: Some information.
```"""

message = message_parse(message_str)

Custom Exceptions

# message_parser can throw exceptions of following types.
from sirji_messages import MessageParsingError, MessageValidationError

Action Enum

from sirji_messages import ActionEnum

# We can use either '.' or '[]' to get the enum
action1 = ActionEnum.ACKNOWLEDGE
action2 = ActionEnum['ACKNOWLEDGE']

Agent Enum

from sirji_messages import AgentEnum

# We can use either '.' or '[]' to get the enum
agent1 = AgentEnum.CODER
agent2 = AgentEnum['CODER']

Message Factory

from sirji_messages import MessageFactory, ActionEnum
message_class = MessageFactory[ActionEnum.ACKNOWLEDGE.name]

License

sirji-messages is made available under the MIT License. See the included LICENSE file for more details.

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

sirji-messages-0.0.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

sirji_messages-0.0.1-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file sirji-messages-0.0.1.tar.gz.

File metadata

  • Download URL: sirji-messages-0.0.1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for sirji-messages-0.0.1.tar.gz
Algorithm Hash digest
SHA256 24454951df495f0370e286909bd91cfa071d3eb940cd24ee3a3c42cb9044e5be
MD5 30863cacfb9cd52837f9f8252ba9aeb9
BLAKE2b-256 a15fbb9515cd5924ec4d8f0f39b5be437e86edd749c316035b50869456a144df

See more details on using hashes here.

File details

Details for the file sirji_messages-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sirji_messages-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.5

File hashes

Hashes for sirji_messages-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f3938ee521d0621e0e1571c688f1c8d654d7a89e90dae155a9833d40d69ce05
MD5 6838ada6517cf3d86e031f8d92e63881
BLAKE2b-256 2ec5b3d616c9908dfecd4870c54f391296850865fde96c8dea69647796d7d6c3

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