{"id":13725490,"url":"https://github.com/hynek/pem","last_synced_at":"2025-05-14T17:07:56.121Z","repository":{"id":9572077,"uuid":"11485300","full_name":"hynek/pem","owner":"hynek","description":"PEM file parsing in Python.","archived":false,"fork":false,"pushed_at":"2025-04-07T17:53:55.000Z","size":470,"stargazers_count":168,"open_issues_count":1,"forks_count":37,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-13T10:04:24.462Z","etag":null,"topics":["certificate","keys","pem","python","ssl","tls"],"latest_commit_sha":null,"homepage":"https://pem.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hynek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"hynek","tidelift":"pypi/pem"}},"created_at":"2013-07-17T19:22:11.000Z","updated_at":"2025-04-07T17:53:59.000Z","dependencies_parsed_at":"2023-11-22T08:16:39.677Z","dependency_job_id":"8f10a7e4-d7c3-41bd-aaff-9c3abe34b626","html_url":"https://github.com/hynek/pem","commit_stats":{"total_commits":412,"total_committers":18,"mean_commits":22.88888888888889,"dds":"0.35922330097087374","last_synced_commit":"a99f9ba7a5c45fe8769c7a27490d80fa9d5193ea"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hynek%2Fpem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hynek%2Fpem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hynek%2Fpem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hynek%2Fpem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hynek","download_url":"https://codeload.github.com/hynek/pem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254190396,"owners_count":22029632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["certificate","keys","pem","python","ssl","tls"],"created_at":"2024-08-03T01:02:24.947Z","updated_at":"2025-05-14T17:07:56.104Z","avatar_url":"https://github.com/hynek.png","language":"Python","funding_links":["https://github.com/sponsors/hynek","https://tidelift.com/funding/github/pypi/pem","https://tidelift.com/?utm_source=lifter\u0026utm_medium=referral\u0026utm_campaign=hynek"],"categories":["Python"],"sub_categories":[],"readme":"# pem: PEM file parsing for Python\n\n[![Docs](https://img.shields.io/badge/Docs-Read%20The%20Docs-black)](https://pem.readthedocs.io/en/stable/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-C06524)](https://github.com/hynek/pem/blob/main/LICENSE)\n[![PyPI - Version](https://img.shields.io/pypi/v/pem.svg)](https://pypi.org/project/pem)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pem.svg)](https://pypi.org/project/pem)\n[![Downloads / Month](https://static.pepy.tech/personalized-badge/pem?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=blue\u0026left_text=Downloads%20/%20Month)](https://pepy.tech/project/pem)\n[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7485/badge)](https://bestpractices.coreinfrastructure.org/projects/7485)\n\n\n\u003c!-- teaser-begin --\u003e\n\n*pem* is a Python module for parsing and splitting of [PEM files](https://en.wikipedia.org/wiki/X.509#Certificate_filename_extensions), i.e. Base64-encoded DER keys and certificates.\n\nIt has no dependencies and does not attempt to interpret the certificate data in any way.\n\nIt’s born from the need to load keys, certificates, trust chains, and Diffie–Hellman parameters from various certificate deployments:\nsome servers (like [Apache](https://httpd.apache.org/)) expect them to be a separate file, others (like [nginx](https://nginx.org/)) expect them concatenated to the server certificate and finally some (like [HAProxy](https://www.haproxy.org/)) expect key, certificate, and chain to be in one file.\nWith *pem*, your Python application can cope with all of those scenarios:\n\n```pycon\n\u003e\u003e\u003e import pem\n\u003e\u003e\u003e certs = pem.parse_file(\"chain.pem\")\n\u003e\u003e\u003e certs\n[\u003cCertificate(PEM string with SHA-1 digest '...')\u003e, \u003cCertificate(PEM string with SHA-1 digest '...')\u003e]\n\u003e\u003e\u003e str(certs[0])\n'-----BEGIN CERTIFICATE-----\\n...'\n```\n\nAdditionally to the vanilla parsing code, *pem* also contains helpers for [Twisted](https://docs.twistedmatrix.com/en/stable/api/twisted.internet.ssl.Certificate.html#loadPEM) that save a lot of boilerplate code.\n\n\n## Project Information\n\n- [**PyPI**](https://pypi.org/project/pem/)\n- [**Source Code**](https://github.com/hynek/pem)\n- [**Documentation**](https://pem.readthedocs.io/)\n- [**Changelog**](https://pem.readthedocs.io/en/stable/changelog.html)\n\n\n### Credits\n\n*pem* is written and maintained by [Hynek Schlawack](https://hynek.me).\n\nThe development is kindly supported by my employer [Variomedia AG](https://www.variomedia.de/) and all my amazing [GitHub Sponsors](https://github.com/sponsors/hynek).\n\n\n### *pem* for Enterprise\n\nAvailable as part of the [Tidelift Subscription](https://tidelift.com/?utm_source=lifter\u0026utm_medium=referral\u0026utm_campaign=hynek).\n\nThe maintainers of *pem* and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications.\nSave time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhynek%2Fpem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhynek%2Fpem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhynek%2Fpem/lists"}