--- id: pem version: "23.1.0" license: unclear license_treatment: permissive maintenance: abandoned --- # pem — PEM file parsing in Python. License: permissive · Maintenance: abandoned · Downloads: 1.4M/mo ## What it is and what it does pem is a lightweight Python library for parsing and extracting individual certificates, keys, and certificate chains from PEM-formatted files. It handles the common problem of different servers expecting certificate components in different arrangements—some require separate files, others concatenated, others combined—by providing simple parsing that works across all scenarios. The library contains no runtime dependencies and does not validate or interpret certificate contents; it purely extracts and splits PEM-encoded blocks. It also includes helpers for Twisted to reduce boilerplate when loading PEM data into Twisted SSL certificate objects. The package supports Python 3.8 through 3.12 and is classified as production/stable. Use it for: - Extract individual certificates from a concatenated PEM chain file for use with servers that require separate certificate files. - Parse mixed PEM files containing keys, certificates, and chains to reorganize them for different server configurations. - Load PEM data into Twisted SSL Certificate objects using built-in helper functions. - Programmatically split OpenPGP keys and certificates from PEM files for cryptographic operations. - Read certificate chains from disk and access individual components via the parsed PEM objects. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses and splits PEM files (Base64-encoded DER keys and certificates) without interpreting the certificate data itself, handling various certificate deployment scenarios. Yes, if you need straightforward PEM parsing with zero dependencies and your use case does not require ongoing maintenance or security updates. The library is stable and handles its narrow scope well, but the abandoned status (no releases since June 2023) means no fixes for future Python or certificate standard changes. Suitable for stable, long-lived applications that do not depend on active upstream support. ## Install pip install pem uv add pem poetry add pem ## Installing pem Before you install: Low install friction with no runtime dependencies. However, the package is marked as abandoned with no releases for 1150 days, which may affect long-term maintenance and security updates. License in practice: Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions. Quickstart: import pem certs = pem.parse_file("chain.pem") print(str(certs[0])) Verify before relying: - Whether the lack of updates since June 2023 affects compatibility with current Python or certificate standards. - Whether Twisted integration helpers remain functional with current Twisted versions. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pem file parsing, certificate parsing python, extract keys from pem, split pem certificates, parse ssl certificates, pem file splitting, certificate chain parsing, certificate-parsing, pem-format, zero-dependency [View on SkillFed](https://skillfed.io/packages/pem) · [View on PyPI](https://pypi.org/project/pem/)