crs4 / hl7apy

Python library to parse, create and handle HL7 v2 messages.
http://crs4.github.io/hl7apy/
MIT License
224 stars 88 forks source link

Expose hook for creating handlers #68

Closed sloria closed 4 years ago

sloria commented 4 years ago

This is independently useful of https://github.com/crs4/hl7apy/pull/67 , but it would meet that use case, since one could do


class MyCustomMllpRequestHandler(mllp._MLLPRequestHandler):
    def _create_handler(self, *args, **kwargs):
        handler = super()._create_handler(*args, **kwargs)
        handler.server = self
        # ... set more attributes
        return handler
coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.2%) to 95.28% when pulling bc16ce7b4837d46603fb323b113c36754d1a001d on sloria:create-handler into beba03d289ca05d332d9011997f660dbe9afa3f3 on crs4:develop.