--- id: pyas2lib version: "1.4.4" license: GNU GPL v2.0 license_treatment: copyleft maintenance: aging --- # pyas2lib — Python library for building and parsing AS2 Messages License: copyleft · Maintenance: aging · Downloads: 119.7K/mo ## What it is and what it does pyas2lib is a pure-Python library for constructing and parsing AS2 protocol messages used in B2B secure file exchange. It handles the full message lifecycle: compression, signing, encryption, MIME construction on the sender side, and decompression, decryption, signature verification on the receiver side. It also manages MDN (Message Disposition Notification) responses, which confirm delivery and processing status. The library decouples message handling from HTTP transport, so you manage the network layer yourself. The package depends on three cryptographic libraries: asn1crypto for ASN.1 parsing, oscrypto for low-level crypto operations, and pyOpenSSL for certificate and key management. It targets Python 3.7–3.10 and is classified as Beta. The library is suitable for applications that need to exchange EDI or other structured data with trading partners over HTTP using the AS2 standard (RFC 4130). Use it for: - Build and send encrypted, signed AS2 messages to trading partners and parse their MDN responses to confirm delivery. - Receive and validate incoming AS2 messages from partners, verify signatures, decrypt payloads, and generate synchronous or asynchronous MDN receipts. - Integrate AS2 message handling into a custom HTTP server or client without relying on a full EDI platform. - Parse MIME-encoded AS2 payloads to extract and verify the integrity of transmitted EDI documents or files. - Manage organization and partner credentials (signing keys, encryption certificates) for multi-partner B2B workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Builds and parses AS2 protocol messages with compression, signing, encryption, and MDN (Message Disposition Notification) handling for secure B2B file exchange. Yes, if you need AS2 protocol support and can accept a copyleft GPL v2.0 license. The library is stable (Beta, no known vulnerabilities), has low install friction, and remains maintained. The 510-day release cycle suggests slow evolution rather than abandonment; check whether the feature set matches your AS2 requirements before committing. Not suitable for proprietary closed-source applications without a separate commercial license. ## Install pip install pyas2lib uv add pyas2lib poetry add pyas2lib ## Installing pyas2lib Before you install: Low install friction with three lightweight cryptographic dependencies (asn1crypto, oscrypto, pyOpenSSL). Maintenance is aging—last release 510 days ago—but the repository remains active with a recent commit on 2025-03-22 and no archived status. License in practice: Licensed under GNU GPL v2.0 (copyleft). Any derivative work or distribution must also be open-source under GPL v2.0; proprietary applications cannot use this library without obtaining a different license. Quickstart: from pyas2lib.as2 import Organization, Partner, Message my_org = Organization(as2_name='my_id', sign_key=b'key', decrypt_key=b'key') partner = Partner(as2_name='partner_id', sign=True, encrypt=True) msg = Message(sender=my_org, receiver=partner) msg.build(b'data_to_transmit') Verify before relying: - Whether the library supports AS2 version 1.2 features beyond RFC 4130 baseline (e.g., newer compression or signing algorithms). - Performance characteristics when processing large payloads or high-volume message streams. - Whether the aging maintenance status (510 days since last release) indicates active development or dormancy. ## Package facts - License: GNU GPL v2.0 (copyleft) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 119.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags AS2 message protocol library, EDI AS2 messaging, secure file transfer AS2, AS2 encryption signing, B2B message protocol, MIME message AS2, MDN message disposition, b2b-messaging, edi-protocol, as2-standard [View on SkillFed](https://skillfed.io/packages/pyas2lib) · [View on PyPI](https://pypi.org/project/pyas2lib/)