{"id":22621328,"url":"https://github.com/jonbeebe/frontmatter","last_synced_at":"2025-04-11T16:36:57.772Z","repository":{"id":53535810,"uuid":"115255267","full_name":"jonbeebe/frontmatter","owner":"jonbeebe","description":"A simple Python package for parsing YAML Frontmatter from a text file or string.","archived":false,"fork":false,"pushed_at":"2024-03-08T08:01:57.000Z","size":33,"stargazers_count":12,"open_issues_count":7,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T16:36:51.556Z","etag":null,"topics":["markdown","python","python-3","yaml","yaml-frontmatter","yaml-parser"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonbeebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-24T10:18:38.000Z","updated_at":"2024-11-22T23:20:42.000Z","dependencies_parsed_at":"2024-06-20T00:02:18.157Z","dependency_job_id":"cfa48b55-361b-4e52-b4e5-5e1b86d8eca7","html_url":"https://github.com/jonbeebe/frontmatter","commit_stats":{"total_commits":41,"total_committers":7,"mean_commits":5.857142857142857,"dds":0.4390243902439024,"last_synced_commit":"63930c9925547da781f5f53625cf6935c01fa4fc"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonbeebe%2Ffrontmatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonbeebe%2Ffrontmatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonbeebe%2Ffrontmatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonbeebe%2Ffrontmatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonbeebe","download_url":"https://codeload.github.com/jonbeebe/frontmatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441507,"owners_count":21104008,"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":["markdown","python","python-3","yaml","yaml-frontmatter","yaml-parser"],"created_at":"2024-12-08T23:07:41.474Z","updated_at":"2025-04-11T16:36:57.752Z","avatar_url":"https://github.com/jonbeebe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"frontmatter\n============\n\nA simple Python package for parsing YAML Frontmatter from a text file or string. Written for Python 3, but should also work for Python 2.7.\n\nUsage\n------\n\n```\nfrom frontmatter import Frontmatter\n\n# assuming 'testfile.md' exists\npost = Frontmatter.read_file('testfile.md')\n\nprint(post['attributes'], \"\\n\")  # Dictionary\nprint(post['body'], \"\\n\")        # String\nprint(post['frontmatter'])       # String\n```\n\nThe output would be:\n\n```\n{'foo': 'bar', 'num': 3, 'list': ['first', 'second', 'third']}\n\nThis is the actual post content\nThis is a second line\n\nfoo: bar\nnum: 3\nlist:\n- first\n- second\n- third\n```\n\nIn the above example, the contents of **testfile.md** is:\n\n```\n---\nfoo: bar\nnum: 3\nlist:\n- first\n- second\n- third\n---\n\nThis is the actual post content\nThis is a second line\n```\n\nLICENSE\n--------\n\n[ISC License](https://en.wikipedia.org/wiki/ISC_license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonbeebe%2Ffrontmatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonbeebe%2Ffrontmatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonbeebe%2Ffrontmatter/lists"}