{"id":22123131,"url":"https://github.com/markdouthwaite/lnkd","last_synced_at":"2026-05-04T02:39:46.792Z","repository":{"id":112157683,"uuid":"255316388","full_name":"markdouthwaite/lnkd","owner":"markdouthwaite","description":"A simple utility for creating linked YAML documents.","archived":false,"fork":false,"pushed_at":"2022-12-26T21:30:55.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T04:27:39.421Z","etag":null,"topics":["custom-tag","pyyaml","yaml"],"latest_commit_sha":null,"homepage":null,"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/markdouthwaite.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-13T12:13:47.000Z","updated_at":"2022-08-23T08:19:39.000Z","dependencies_parsed_at":"2024-04-13T06:30:50.692Z","dependency_job_id":null,"html_url":"https://github.com/markdouthwaite/lnkd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"markdouthwaite/python-package-template","purl":"pkg:github/markdouthwaite/lnkd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdouthwaite%2Flnkd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdouthwaite%2Flnkd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdouthwaite%2Flnkd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdouthwaite%2Flnkd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markdouthwaite","download_url":"https://codeload.github.com/markdouthwaite/lnkd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markdouthwaite%2Flnkd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["custom-tag","pyyaml","yaml"],"created_at":"2024-12-01T15:29:28.962Z","updated_at":"2026-05-04T02:39:46.756Z","avatar_url":"https://github.com/markdouthwaite.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eLNKD\u003c/h1\u003e\n\u003cp align=\"center\"\u003eSimple linked YAML documents.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/markdouthwaite/lnkd/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/markdouthwaite/lnkd/workflows/Build/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/pre-commit/pre-commit\"\u003e\u003cimg alt=\"Uses pre-commit\" src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ambv/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/Code%20Style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA simple utility for linking YAML documents. For Python \u003e=3.6.\n\n## Getting started\n\nYou can install `lnkd` with:\n\n```bash\npip install lnkd\n```\n\n## Why does it exist?\n\nIf you work with cloud technologies, YAML is part of your day job. It's often great for\nmanaging complex service configurations, but it's also not uncommon to get YAML files\nmany hundreds of lines long. Some of the more advanced features of YAML -- such as\n[merge tags](https://yaml.org/type/merge.html) make this process a little easier,but\nnot always ideal.\n\nLong story short, this little package is the offshoot of an afternoon roaming the\ninterwebs trying to figure out how best to link YAML files across multiple local and\nremote locations and stitch them together nicely. It is not the only way of doing this,\nand it's also almost certainly not the best way of doing it. In fact, it will make it\nvery easy to create a lot of anti-patterns, and by default your YAML parser is unlikely\nto get on well with the new tag. Adding new syntax is dangerous. You've been warned.\n\nAnyway, it's here on the off-chance someone wants to avoid an afternoon of trawling\nStack Overflow.\n\nRight, so how does it look?\n\nYou now get the `!@` tag to add to your YAML. Here's how it works:\n\nSay we've a big ol' config file. Here we'll pretend it's a `docker-compose` file:\n\n```yaml\n# service.yaml\nversion: '3'\nservices:\n    client:\n        !@ client.yaml\n```\n\nAnd we store our `client` service config in a file `client.yaml`:\n\n```yaml\n# client.yaml\nbuild:\n    image: python:3.6-alpine\n    environment:\n        POSTGRES_USER: admin\n        POSTGRES_PASSWORD: 1234\n        POSTGRES_DB: accounts\n```\n\nIf we then run:\n\n```bash\nlnkd service.yaml --output docker-compose.yaml\n```\n\nWe'd get:\n\n\n```yaml\n# docker-compose.yaml\nversion: '3'\nservices:\n    client:\n        build:\n            image: python:3.6-alpine\n            environment:\n              POSTGRES_USER: admin\n              POSTGRES_PASSWORD: 1234\n              POSTGRES_DB: accounts\n```\n\nAnd that's pretty much it. You can use these components programmatically to load and\nbuild your YAML structures too.\n\n## Programmatic usage\n\nWant to use these capabilities directly in your Python code? No problem, you can use them like:\n\n```python\nimport yaml\nimport lnkd\n\nwith open(\"service.yaml\", \"r\") as file:\n    data = yaml.load(file, Loader=lnkd.LinkedLoader)\n```\n\nYou'll get the linked data as a dictionary.\n\n# Notes\n\n- If you can, use `anchors` and `aliases` instead. If you haven't heard of these before, Atlassian have written a [short example](https://confluence.atlassian.com/bitbucket/yaml-anchors-960154027.html).\n- This package implements only custom tags. It _does not_ enable shared anchors and aliases across files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkdouthwaite%2Flnkd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkdouthwaite%2Flnkd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkdouthwaite%2Flnkd/lists"}