{"id":37080791,"url":"https://github.com/tiagoepr/mllp-https","last_synced_at":"2026-01-14T09:48:30.148Z","repository":{"id":57848758,"uuid":"506696060","full_name":"tiagoepr/mllp-https","owner":"tiagoepr","description":"A MLLP to \u0026 from HTTP(S) parser","archived":false,"fork":true,"pushed_at":"2022-12-28T16:18:14.000Z","size":175,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-04T20:41:08.925Z","etag":null,"topics":["healthcare","hl7","https","mllp","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rivethealth/mllp-http","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagoepr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-23T15:34:11.000Z","updated_at":"2025-05-14T13:51:28.000Z","dependencies_parsed_at":"2023-01-31T06:50:12.593Z","dependency_job_id":null,"html_url":"https://github.com/tiagoepr/mllp-https","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/tiagoepr/mllp-https","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagoepr%2Fmllp-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagoepr%2Fmllp-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagoepr%2Fmllp-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagoepr%2Fmllp-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagoepr","download_url":"https://codeload.github.com/tiagoepr/mllp-https/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagoepr%2Fmllp-https/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["healthcare","hl7","https","mllp","python"],"created_at":"2026-01-14T09:48:29.703Z","updated_at":"2026-01-14T09:48:30.142Z","avatar_url":"https://github.com/tiagoepr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MLLP/HTTP(S)\n\n[![PyPI](https://img.shields.io/pypi/v/mllp-https)](https://pypi.org/project/mllp-https/)\n\n\n[Project](https://github.com/tiagoepr/mllp-https/) addapted by: Tiago Rodrigues, 2022 \u003cbr\u003e\n\nThis project results of an enhanced package supporting HTTPS of the [original project](https://pypi.org/project/mllp-http/), whose original credits are given to [Rivet Health](https://pypi.org/user/rivet/)\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/tiagoepr/mllp-https/raw/master/doc/logo.png\"\u003e\n\u003c/p\u003e\n\n## Overview\n\nConvert MLLP to HTTP(S) and vice versa.\n\n`http2mllp` is a HTTP server that translates to MLLP.\n\n`mllp2http` is a MLLP server that translates to HTTP.\n\n`https2mllp` is a HTTPS server that translates to MLLP.\n\n`mllp2https` is a MLLP server that translates to HTTPS.\n\nKeywords: MLLP, HTTP, HTTPS, SSL/TLS, HL7\n\n## Description\n\nMLLP (Minimum Lower Layer Protocol) is the traditional session protocol for HL7\nmessages.\n\nMany modern tools (load balancers, application frameworks, API monitoring) are\ndesigned around HTTP(S). This observation is the foundation for the\n[HL7 over HTTP](https://hapifhir.github.io/hapi-hl7v2/hapi-hl7overhttp/specification.html)\nspecification.\n\nThis project, MLLP/HTTP(S), bridges these two protocols, allowing network engineers\nand application developers to work with familiar HTTP(S) technology while\ninterfacing with MLLP-based programs.\n\nImplements\n[MLLP release 1](https://www.hl7.org/documentcenter/public/wg/inm/mllp_transport_specification.PDF), [HTTP/1.1](https://tools.ietf.org/html/rfc2616), and SSL/TLS (optional). Each MLLP message is\nassumed to have a corresponding response message (e.g. HL7 acknoledgment).\n\nNote that this project deals only with the MLLP layer; it does not process HL7\nmessages themselves. Notably, the HTTP participant must be able to intepret HL7\nmessages and generate acknowledgements. This separation imposes no requirements\nfor HL7 usage and leaves application developers with full access to the features\nof the HL7 protocol.\n\n## Install\n\n\n### By [Pip](https://pypi.org/project/awscli-saml/)\n```sh\npip install mllp-https\n```\n\n### By Command Line\nOn the project folder, run the command:\n```sh\npython setup.py install\n```\n\n\n\n## Run as\n### Command Line\n```sh\nhttp2mllp localhost \n\nmllp2http http://localhost:8000\n\nhttps2mllp localhost\n\nmllp2https https://localhost:8000\n```\n\n#### Notes on SSL/TLS:\nTo use https2mllp as a https server/listener, it is required to provide a valid path for SSL certificate file and private key file. In order to do that, both certificate and key files should be placed on a folder \"C:/ssl/\", such that the files' paths are \"C:/ssl/certfile.crt\" and \"C:/ssl/keyfile.key\". Otherwise, both paths should be passed as argument:\n```sh\nhttps2mllp localhost --mllp_port 2575 --certfile /PATH/TO/certfile.crt --keyfile /PATH/TO/keyfile.key\n```\n\n### [Docker](https://hub.docker.com/r/tiagoepr/mllp-https)\nPull from Docker Hub:\n```sh\ndocker pull tiagoepr/mllp-https\n```\nor build from dockerfile:\n```sh\ndocker build -t tiagoepr/mllp-https .\n```\n\n\nRun as:\n\n```sh\ndocker run -it -p 8000:8000 --rm tiagoepr/mllp-https http2mllp host.docker.internal\n\ndocker run -it -p 2575:2575 --rm tiagoepr/mllp-https mllp2http http://host.docker.internal:8000\n\ndocker run -it -p 8000:8000 --rm tiagoepr/mllp-https https2mllp host.docker.internal (See note below about SSL certificate)\n\ndocker run -it -p 2575:2575 --rm tiagoepr/mllp-https mllp2https https://host.docker.internal:8000    \n```\n#### Notes on SSL/TLS:\nTo use https2mllp as a https server/listener, it is required to provide a valid path for SSL certificate file and private key file. In order to do that, both certificate and key files should be firstly copied onto the Docker container and then the respective paths given as argument.\n\u003cbr\u003eTo do that, with the container running, run the command on the host:\n\n```sh\ndocker cp [LOCAL/PATH/TO/ssl] [container_id]:/usr/local/lib/python3.10/site-packages/mllp_http_https/ssl\n```\nwhere [LOCAL/PATH/TO/ssh] is the path for the folder containing the certfile.crt and keyfile.key and [container_id] should be replaced by the container ID which is running.\n\u003cbr\u003eNow, on the container bash, run the command:\n```sh\ndocker run -it -p 8000:8000 --rm tiagoepr/mllp-https https2mllp host.docker.internal --certfile /usr/local/lib/python3.7/site-packages/mllp_http_https/ssl/certfile.crt --keyfile /usr/local/lib/python3.7/site-packages/mllp_http_https/ssl/keyfile.key\n```\n## Usage\n\n### http2mllp\n\n```\nusage: http2mllp [-h] [-H HOST] [-p PORT] [--keep-alive KEEP_ALIVE] [--log-level {error,warn,info}]\n                 [--mllp-keep-alive MLLP_KEEP_ALIVE] [--mllp-max-messages MLLP_MAX_MESSAGES] [--mllp-release {1}]\n                 [--timeout TIMEOUT] [--content-type CONTENT_TYPE] [-v] [--mllp_port MLLP_PORT]\n                 mllp_url\n\n            HTTP server that proxies an MLLP client.\n            Expects an MLLP response message and uses it as the HTTP response.\n\n\npositional arguments:\n  mllp_url              MLLP URL, Defaulf: hostname\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -H HOST, --host HOST  HTTP host (default: 0.0.0.0)\n  -p PORT, --port PORT  HTTP port (default: 8000)\n  --keep-alive KEEP_ALIVE\n                        keep-alive in milliseconds, or unlimited if -1. (default: -1)\n  --log-level {error,warn,info}\n  --mllp-keep-alive MLLP_KEEP_ALIVE\n                        keep-alive in milliseconds, or unlimited if -1. (default: -1)\n  --mllp-max-messages MLLP_MAX_MESSAGES\n                        maximum number of messages per connection, or unlimited if -1. (default: -1)\n  --mllp-release {1}    MLLP release version (default: 1)\n  --timeout TIMEOUT     socket timeout, in milliseconds, or unlimited if 0. (default: 0)\n  --content-type CONTENT_TYPE\n                        HTTP Content-Type header (default: x-application/hl7-v2+er7)\n  -v, --version         show program's version number and exit\n  --mllp_port MLLP_PORT\n                        MLLP PORT (default: 2575)\n```\n\n### mllp2http\n\n```\nusage: mllp2https [-h] [-H HOST] [-p PORT] [--username USERNAME] [--password PASSWORD] [--content-type CONTENT_TYPE] [--log-level {error,warn,info}] [--log-file LOG_FILE] [--mllp-release {1}] [--timeout TIMEOUT] [--verify {False,True}]\n                  [-v]\n                  https_url\n\nMLLP server that proxies an HTTPS client. Sends back the HTTPS response.\n\npositional arguments:\n  https_url             HTTPS URL\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -H HOST, --host HOST  MLLP host (default: 0.0.0.0)\n  -p PORT, --port PORT  MLLP port (default: 2575)\n  --username USERNAME   Username for HTTPS server authentication (Optional). If not provided, authentication will be skipped. (default: None)\n  --password PASSWORD   User password for HTTPS server authentication (Optional). If not provided, authentication will be skipped. (default: None)\n  --content-type CONTENT_TYPE\n                        HTTPS Content-Type header (default: application/hl7-v2; charset=utf-8)\n  --log-level {error,warn,info}\n  --log-file LOG_FILE   Path to file where the logs will be placed. If not provided logging will be done on command window. (default: None)\n  --mllp-release {1}    MLLP release version (default: 1)\n  --timeout TIMEOUT     timeout in milliseconds (default: 0)\n  --verify {False,True}\n                        Verify SSL certificate on server side. True as default (default: True)\n  -v, --version         show program's version number and exit\n\nenvironment variables:\n    HTTP_AUTHORIZATION - HTTP Authorization header\n    X-API-KEY - HTTP X-API-KEY header\n```\n\n\n### https2mllp\n```\nusage: https2mllp [-h] [-H HOST] [-p PORT] [--username USERNAME] [--password PASSWORD] [--keep-alive KEEP_ALIVE] [--log-level {error,warn,info}] [--log-folder LOG_FOLDER] [--mllp-keep-alive MLLP_KEEP_ALIVE]\n                  [--mllp-max-messages MLLP_MAX_MESSAGES] [--mllp-release {1}] [--timeout TIMEOUT] [--content-type CONTENT_TYPE] [--mllp_port MLLP_PORT] [--certfile CERTFILE] [--keyfile KEYFILE] [--mllp_parser {True,False}] [-v]\n                  mllp_url\n\n            HTTPS server that proxies an MLLP client.\n            Expects an MLLP response message and uses it as the HTTPS response.\n\n\npositional arguments:\n  mllp_url              MLLP URL, Defaulf: hostname\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --mllp_port MLLP_PORT\n                        MLLP PORT (default: 2575)\n  -H HOST, --host HOST  HTTPS host (default: 0.0.0.0)\n  -p PORT, --port PORT  HTTPS port (default: 8000)\n  --username USERNAME   Username for HTTPS server authentication (Optional). If not provided, authentication will be skipped unless the environment vartiable exists. (default: None)\n  --password PASSWORD   User password for HTTPS server authentication (Optional). If not provided, authentication will be skipped  unless the environment vartiable exists. (default: None)\n  --keep-alive KEEP_ALIVE\n                        keep-alive in milliseconds, or unlimited if -1. (default: 0)\n  --log-level {error,warn,info}\n  --log-folder LOG_FOLDER   Path to folder where the logs will be placed. If not provided logging will be done on command window. (default: None)\n  --mllp-keep-alive MLLP_KEEP_ALIVE\n                        keep-alive in milliseconds, or unlimited if -1. (default: 10000)\n  --mllp-max-messages MLLP_MAX_MESSAGES\n                        maximum number of messages per connection, or unlimited if -1. (default: -1)\n  --mllp-release {1}    MLLP release version (default: 1)\n  --timeout TIMEOUT     socket timeout, in milliseconds, or unlimited if 0. (default: 0)\n  --content-type CONTENT_TYPE\n                        HTTPS Content-Type header (default: application/hl7-v2; charset=utf-8)\n  --certfile CERTFILE   Path for HTTPS Server's SSL/TLS Certificate. (default: C:/ssl/certfile.crt)\n  --keyfile KEYFILE     Path for HTTPS Server's SSL/TLS Private Key. (default: C:/ssl/keyfile.key)\n  --mllp_parser {True,False}\n                        If False, the package will not parse the MLLP and will send an HTTPS POST with the MLLP encapsulating the HL7 message. If True, the HTTPS POST will only present the HL7 on the Body without MLLP characters\n                        (default: True)\n  -v, --version         Show program's version number and exit\n```\n\n\n### mllp2https\n\n```\nusage: mllp2https [-h] [-H HOST] [-p PORT] [--username USERNAME] [--password PASSWORD] [--content-type CONTENT_TYPE] [--log-level {error,warn,info}] [--log-folder LOG_FOLDER] [--mllp-release {1}] [--timeout TIMEOUT] [--verify {False,True}]\n                  [-v]\n                  https_url\n\nMLLP server that proxies an HTTPS client. Sends back the HTTPS response.\n\npositional arguments:\n  https_url             HTTPS URL\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -H HOST, --host HOST  MLLP host (default: 0.0.0.0)\n  -p PORT, --port PORT  MLLP port (default: 2575)\n  --username USERNAME   Username for HTTPS server authentication (Optional). If not provided, authentication will be skipped. (default: None)\n  --password PASSWORD   User password for HTTPS server authentication (Optional). If not provided, authentication will be skipped. (default: None)\n  --content-type CONTENT_TYPE\n                        HTTPS Content-Type header (default: application/hl7-v2; charset=utf-8)\n  --log-level {error,warn,info}\n  --log-folder LOG_FOLDER   Path to folder where the logs will be placed. If not provided logging will be done on command window. (default: None)\n  --mllp-release {1}    MLLP release version (default: 1)\n  --timeout TIMEOUT     Timeout in milliseconds (default: 0)\n  --verify {False,True}\n                        Verify SSL certificate on server side. Should be set to 'True', 'False' or to a path to a CA_BUNDLE file or directory with certificates of trusted Cas.\n  -v, --version         show program's version number and exit\n\nenvironment variables:\n    HTTPS_AUTHORIZATION - HTTPS Authorization header\n    X-API-KEY - HTTPS X-API-KEY header\n\n```\n\n\n\n## Examples\n\n### mllp2http\n\nRun an HTTP debugging server:\n\n```sh\ndocker run -p 8000:80 --rm kennethreitz/httpbin\n```\n\nRun the MLLP connector:\n\n```sh\nmllp2http http://localhost:8000\n```\n\nSend an MLLP message:\n\n```sh\nprintf '\\x0bMESSAGE\\x1c\\x0d' | socat - TCP:localhost:2575\n```\n\nand see the HTTP server's response (which describes the HTTP request that the\nconnector made):\n\n```json\n{\n  \"args\": {},\n  \"data\": \"MESSAGE\",\n  \"files\": {},\n  \"form\": {},\n  \"headers\": {\n    \"Accept\": \"*/*\",\n    \"Accept-Encoding\": \"gzip, deflate\",\n    \"Connection\": \"keep-alive\",\n    \"Content-Length\": \"7\",\n    \"Content-Type\": \"x-application/hl7-v2+er7\",\n    \"Forwarded\": \"by=127.0.0.1:2575;for=127.0.0.1:54572;proto=mllp\",\n    \"Host\": \"localhost:8000\",\n    \"User-Agent\": \"mllp2http/1.0.2\"\n  },\n  \"json\": null,\n  \"origin\": \"127.0.0.1:54572\",\n  \"url\": \"mllp://localhost:8000/post\"\n}\n```\n\n## Developing\n\nTo install:\n\n```sh\nmake install\n```\n\nBefore committing, format:\n\n```sh\nmake format\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagoepr%2Fmllp-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagoepr%2Fmllp-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagoepr%2Fmllp-https/lists"}