{"id":16652603,"url":"https://github.com/sabujxi/syd","last_synced_at":"2025-07-10T16:35:22.068Z","repository":{"id":100214746,"uuid":"218145594","full_name":"SabujXi/Syd","owner":"SabujXi","description":"A new human readable/writable data format invented out of frustration in yaml, json and other existing formats -- Pulled from two years old Synamic framework","archived":false,"fork":false,"pushed_at":"2020-03-31T11:29:25.000Z","size":38,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T16:26:59.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SabujXi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-10-28T21:08:14.000Z","updated_at":"2020-03-31T11:29:28.000Z","dependencies_parsed_at":"2023-05-09T12:47:11.178Z","dependency_job_id":null,"html_url":"https://github.com/SabujXi/Syd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SabujXi/Syd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabujXi%2FSyd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabujXi%2FSyd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabujXi%2FSyd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabujXi%2FSyd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SabujXi","download_url":"https://codeload.github.com/SabujXi/Syd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabujXi%2FSyd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264608246,"owners_count":23636691,"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":[],"created_at":"2024-10-12T09:29:12.141Z","updated_at":"2025-07-10T16:35:21.882Z","avatar_url":"https://github.com/SabujXi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Syd - Synamic Data Format: Better alternative to yaml, toml, json, and many others.\r\nA new data format that was invented out of frustration in existing data formats like yaml, toml, json, etc.\r\nIt was created and improved bit by bit during the development of two years old framework Synamic.\r\n\r\nThe features, flexibility, extensibility, and intuitiveness that were not found in those formats was the motivation behind this.\r\nThe work begun in 2017 inside the framework Synamic and now it is being released as a separate library.\r\n\r\n# Draft \u0026 Old Doc from Comments (Not Updated as the Code)\r\n`# lots of thoughts needed.`\r\n\r\n-------------------------------------------------------------------------\r\n## comments\r\n\r\n`//` is a single line comment.\r\n\r\n`#` is also a single line comment.\r\n\r\n**Where comments can appear:**\r\n1. Inside a block: on an independent line that does not contain scalar data\r\n2. Inside a block list: on an independent line that does not contain scalar data\r\n3. After the starting curly brace/bracket of block/list.\r\n4. On an empty line outside of blocks/block lists. That is on the independent lines of file. Be noted that, a file is considered block and it\r\n    Contains key value pairs.\r\n\r\nWhere it cannot appear:\r\nWithin or at the end of scalar data: string, number, date\r\nWithin or at the end of linear list: (a, t, 5)\r\n\r\nComments may be preceded by spaces and/or tabs.\r\n\r\n`\\#` is a literal hash. Hash inside strings are also literal hash.\r\n\r\n`\\//` is also literal two forward slash.\r\n\r\n\r\n## import/include\r\nOther data files can also be imported/included with !include \u003crelative file name with or without ext\u003e\r\n\r\n!include must be on it's own line.\r\n\r\n## load model\r\n\r\nModels can be specified by the system\r\n\r\n\r\n## interpolation\r\n\r\nInterpolation happens in the second pass. So, after everything is loaded, the non-recursive keys can be found\r\neasily.\r\n\r\n`{{ key }}`\r\n\r\n`{{ key.subkey }}`\r\n\r\nkey can be found in the current data file or from an included file.\r\n\r\nTo put literal `{{` then just precede it with a single backward slash. `\\{{`\r\nThis is not needed for single curly brace.\r\n\r\n## escaping\r\n\r\nEscaping is done through backward slash. Escaping are relaxed and special in synamic data file.\r\nTo escape a backward slash escape it with another one.\r\nEscaping does not take place in each and every thing.\r\n\r\nCALCEL, don't want to keep type hinting, need to make things clean for end user | data __document_types\r\n\r\n## Data type enforcement\r\n\r\nIf you want to force type on a data then you can use the following key suffixes.\r\n```\r\n!n -\u003e number\r\n!i -\u003e integer\r\n!f -\u003e float\r\n!d -\u003e date\r\n!t -\u003e time\r\n!dt -\u003e date-time\r\n!s -\u003e string\r\n!l -\u003e list\r\n!b -\u003e boolean\r\n```\r\n**Other suffixes can also be defined by the system with models**\r\n\r\n1) Number: Priority Top (1)\r\n```\r\n-\u003e 1 \u003c- is a number.\r\n-\u003e 2.5 \u003c- is a number.\r\n```\r\n**1 \u0026 1.0 are equal.**\r\n\r\n2) Date, Time \u0026 Datetime: Priority 2\r\n\r\nIf something falls in the format of date, time or datetime that is considered is date.\r\nThe default formats are.\r\n\r\nIf you want a date like format to be treated like string then use quoted string.\r\n\r\nDate: \u003c4 digit year\u003e:\u003c1 or 2 digit month within the range of 1-12\u003e:\u003c1 or 2 digit date within the range defined by month\u003e\r\nTime: \u003c1 or 2 digit hour within range of 0-23 or 0-12 if AM/PM present\u003e:\u003c1 or 2 digit minute 1-59\u003e:\u003cOptional: 1 or 2 digit seconds\u003e:\u003cOptional: AM/PM - case insensitive\u003e\r\nDatetime: Combination of date \u0026 time separated by space character(s) - spaces/tabs.\r\n\r\n3) String: Priority 3 \r\n\r\n-\u003e Strings 1 (no quotation): strings does not need any quotation mark. No special/escape characters - everything is literal char.\r\nkey: this is a string value, leading and trailing spaces are ignored.\r\n\r\n-\u003e String 2 (single quotation): if the value part starts with a single quotation then it is considered single\r\nquoted string. a quotation inside it must be escaped with backward slash. \r\n\r\n4) List: Priority 4\r\n\r\n*If a key ends with \"!l\" or \"!L\" then it will be considered a list. So, there is no need to to delimit\r\nlist elements with [ \u0026 ]*\r\n\r\n- List elements are separated by commas. You cannot enforce type on list elements, they must be inferred.\r\n- if you want special treatment then use model based parsing.\r\n\r\n- List elements can contain numbers, single line strings, date, time, date-time, boolean data __document_types only.\r\n- Strings must be single line strings. You can use multiline strings with triple quoting.\r\n\r\n4) Other data: Priority 3\r\n\r\nIf a key is mentioned in an associated model then the string is parsed.\r\n\r\n \r\n\r\n-------------------------------------------------------------------------\r\n\r\n\r\n!include values-dev.txt\r\n!include_if_exists values-super-dev2.txt\r\n\r\nkey1 : value\r\n// data type specification cancelled: key10 !s the colon after the key is optional.\r\n// data type specification cancelled: key11 !l : this is, a typed, key, with type list\r\nkey2 {\r\n        multilevel: value 2\r\n}\r\n\r\n## multiline text:\r\n key must be suffixed with ~, in this case there must not be any type specifier.\r\n**as described above, the colon is optional. But a multiline text must be enclosed in curly braces.**\r\n\r\n```\r\nkey3~: {\r\n\r\n}\r\n```\r\n\r\n*if the there is no text after { then this empty line is not included in the output.*\r\n*if it contains some text then the preceding spaces are also considered to be included in the calculation of indentaion.*\r\n\r\n```\r\nkey30~ {\r\n         Indentation does not start here.\r\n  Indentation starts here.\r\n  Tab normalization happens (no replace - just counted virtually) for counting indentation. One tab is considered\r\n     as 4 spaces.\r\n}\r\n```\r\n\r\n*if you do not want any indentation detection happen and take all the text literally, then you must use double tilde.*\r\n\r\n```\r\nkey31~~ : {\r\n   All preceded spaces are kept\r\nIntact, no matter at how many level the key is nested.\r\n}\r\n```\r\n\r\n## Nested values\r\n```\r\nkey4: {  \r\n    k1: {\r\n         k11: value\r\n    }\r\n    k2: single line\r\n    multiline~ {\r\n    }\r\n}\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabujxi%2Fsyd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabujxi%2Fsyd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabujxi%2Fsyd/lists"}