NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4167 most downloaded on PyPI
PEM file parsing in Python.
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 2 months to 2.2 years
Nearly every release is documented
notes for 16 of 16 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
16 releases · first in 2013
pem has grown support for OpenPGP public and private keys (please don't use PGP if you can help it) and now allows to directly access the payload sans
pem has grown support for OpenPGP public and private keys (please don't use PGP if you can help it) and now allows to directly access the payload sans envelope, and possible in-payload headers!
Also lots of polish in all corners!
This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If you would like to join them, go to https://github.com/sponsors/hynek and check out the sweet perks!
Variomedia AG (@variomedia), Tidelift (@tidelift), Sentry (@getsentry), HiredScore (@HiredScore), FilePreviews (@filepreviews), and Daniel Fortunov (@asqui).
Adam Hill (@adamghill), Dan Groshev (@si14), Magnus Watn (@magnuswatn), David Cramer (@dcramer), Moving Content AG (@moving-content), Stein Magnus Jodal (@jodal), ProteinQure (@ProteinQure), Jesse Snyder (@jessesnyder), Rivo Laks (@rivol), Tom Ballinger (@thomasballinger), Ionel Cristian Mărieș (@ionelmc), The Westervelt Company (@westerveltco), Philippe Galvan (@PhilippeGalvan), Birk Jernström (@birkjernstrom), Tim Schilling (@tim-schilling), Chris Withers (@cjw296), Christopher Dignam (@chdsbd), Stefan Hagen (@sthagen), Yarden zamir (@Yarden-zamir), and zorazen (@ZoraZen).
Not to forget 3 more amazing humans who chose to be generous but anonymous!
pem.OpenPGPPublicKey and pem.OpenPGPPrivateKey. #72meta_headers property. #75pem.parse_file() now accepts also pathlib.Path objects.pem.parse() now also accepts str.text_payload, bytes_payload and decoded_payload properties to all PEM objects that allow to directly access the payload without the envelope and possible headers. #74One column per quarter.
Added support for pem.OpenSSLTrustedCertificate (-----BEGIN TRUSTED CERTIFICATE-----), as defined in openssl x509 manual. #28
pem.OpenSSLTrustedCertificate (-----BEGIN TRUSTED CERTIFICATE-----), as defined in openssl x509 manual.
#28Added support for DSA private keys (BEGIN DSA PRIVATE). This is also the OpenSSH legacy PEM format. #49
BEGIN DSA PRIVATE).
This is also the OpenSSH legacy PEM format.
#49pem.SSHPublicKey (---- BEGIN SSH2 PUBLIC KEY ----), as defined in RFC 4716.
#46pem.SSHCOMPrivateKey (---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----), the SSH.com / Tectia private key format (plain or encrypted).
#46Carriage returns (\r) are now stripped before hashing *pem* objects to provide consistent hashes across platforms. #40
\r) are now stripped before hashing pem objects to provide consistent hashes across platforms.
#40Python 3.4 is not supported anymore. It has been unsupported by the Python core team for a while now and its PyPI downloads are negligible.
Python 3.4 is not supported anymore. It has been unsupported by the Python core team for a while now and its PyPI downloads are negligible.
It's very unlikely that pem will break under 3.4 anytime soon, but we don't test it anymore.
pem.OpenSSHPrivateKey (OPENSSH PRIVATE KEY).
OpenSSH added a new BEGIN label when it switched to a proprietary key encoding.
#39Added support for pem.ECPrivateKey (EC PRIVATE KEY).
pem.ECPrivateKey (EC PRIVATE KEY).You can now load encrypted PKCS#8 PEM key as pem.Key.
pem.Key.pem.PublicKey (PUBLIC KEY).pem.RSAPublicKey (RSA PUBLIC KEY).Added pem.CertificateRevocationList for certificate revocation lists (CRLs). #32
pem.CertificateRevocationList for certificate revocation lists (CRLs).
#32pem.certificateOptionsFromFiles() and pem.certificateOptionsFromPEMs() have been removed after three years of deprecation. Please use pem.twisted.cert…
pem.certificateOptionsFromFiles() and pem.certificateOptionsFromPEMs() have been removed after three years of deprecation.
Please use pem.twisted.certificateOptionsFromFiles() pem.twisted.certificateOptionsFromPEMs() instead.obj.sha1_hexdigest property with the SHA-1 digest of the stored bytes as a native string.
This is the same digest as the one that is used by the PEM objects' __repr__s.obj.as_text() method that returns the PEM-encoded content as unicode, always.Added pem.CertificateRequest for certificate signing requests. #29
pem.CertificateRequest for certificate signing requests.
#29Passing dhParameters to pem.twisted.certifateOptionsFromPEMs and certificateOptionsFromFiles is now deprecated; instead, include the DH parameters in…
dhParameters to pem.twisted.certifateOptionsFromPEMs and certificateOptionsFromFiles is now deprecated;
instead, include the DH parameters in the PEM objects or files.Python 3.3 and 2.6 aren't supported anymore. They may work by chance but any effort to keep them working has ceased.
The last Python 2.6 release was on October 29, 2013 and isn't supported by the CPython core team anymore. Major Python packages like Django and Twisted dropped Python 2.6 a while ago already.
Python 3.3 never had a significant user base and wasn't part of any distribution's LTS release.
pem.twisted.certificateOptionsFromPEMs and certificateOptionsFromFiles will now load Ephemeral Diffie-Hellman parameters if found.
#21as_bytes method that returns the PEM-encoded content as bytes, always.
#24PKCS #8 keys are now supported. #14
The usage of Twisted helpers from the pem module is deprecated. Use their pendants from the pem.twisted module now.
pem.twisted module now.\r\n.pem.twisted.Load PEM files as UTF-8 to allow for non-ASCII comments (like in *certifi*).
Add forward-compatible support for DHE.
Initial release.
Initial release.
Initial release.
On this page
Changelog
23.1.0 - 2023-06-21
Removed
Added
21.2.0 - 2021-04-07
Added
21.1.0 - 2021-01-22
Added
20.1.0 - 2020-01-06
Changed
19.3.0 - 2019-10-16
Removed
Added
19.2.0 - 2019-08-06
Added
19.1.0 - 2019-03-19
Added
18.2.0 - 2018-10-09
Added
18.1.0 - 2018-06-23
Removed
Added
17.1.0 - 2017-08-10
Added
16.1.0 - 2016-04-08
Deprecated
Removed
Added
Fixed
16.0.0 - 2016-02-05
Added
15.0.0 - 2015-07-10
Deprecated
Changed
0.3.0 - 2014-04-15
Changed
0.2.0 - 2014-03-13
Added
0.1.0 - 2013-07-18
Your coding agent can read these notes before it upgrades. Set up the MCP server →