{"id":20355973,"url":"https://github.com/enspirit/monolens","last_synced_at":"2025-04-12T02:51:15.010Z","repository":{"id":37848288,"uuid":"488660578","full_name":"enspirit/monolens","owner":"enspirit","description":"Declarative data transformations as data","archived":false,"fork":false,"pushed_at":"2024-07-17T20:45:43.000Z","size":224,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T22:35:34.975Z","etag":null,"topics":["data","data-engineering","homoiconic","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/enspirit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-05-04T16:19:16.000Z","updated_at":"2025-02-22T01:27:14.000Z","dependencies_parsed_at":"2024-07-18T01:02:47.685Z","dependency_job_id":null,"html_url":"https://github.com/enspirit/monolens","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enspirit%2Fmonolens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enspirit%2Fmonolens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enspirit%2Fmonolens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enspirit%2Fmonolens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enspirit","download_url":"https://codeload.github.com/enspirit/monolens/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447550,"owners_count":21105137,"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":["data","data-engineering","homoiconic","json","yaml"],"created_at":"2024-11-14T23:14:38.126Z","updated_at":"2025-04-12T02:51:14.985Z","avatar_url":"https://github.com/enspirit.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monolens - Declarative data transformations\n\nDeclarative data transformations expressed as simple .yaml or\n.json files. They are great to\n\n- clean an Excel file\n- transform a .json file\n- transform data from a .csv file\n- upgrade a .yaml configuration\n- etc.\n\nMonolens let's you tackle those tasks with small programs that are\nsimple, declarative, robust, secure, reusable and sharable.\n\n## Features / Limitations\n\n* Declarative \u0026 language agnostic\n* Allows transforming scalars (e.g. string, dates), objects and arrays.\n* Support for (simplified) jsonpath interpolation when defining objects\n* Support for macros (monolens is an homoiconic language)\n* Secure: not Turing Complete, no code injection, no RegExp DDoS\n\n* Requires ruby \u003e= 2.6\n* Not reached 1.0 yet, still experimental\n\n## Documentation \u0026 Examples\n\nPlease refer to the `documentation/` folder for a longer introduction,\ndocumentation of the stdlib, and documented use-cases:\n\n- [Introduction](./documentation/1-introduction.md)\n- [Standard library](./documentation/stdlib)\n- [Use cases](./documentation/use-cases)\n  - [Kubernetes data templates](./documentation/use-cases/data-templates/)\n  - [Migrating database seeds](./documentation/use-cases/data-transformation/)\n\n## Getting started\n\n### In shell\n\n```\ngem install monolens\n```\n\nThen:\n\n```shell\nmonolens --help\nmonolens lens.yaml input.json\n```\n\n### In ruby\n\n```ruby\n# Gemfile\ngem 'monolens', '\u003c 1.0'\n```\n\n```ruby\nrequire 'monolens'\nrequire 'json'\n\nlens   = Monolens.load_file('lens.yml')\ninput  = JSON.parse(File.read('input.json'))\nresult = lens.call(input)\n```\n\n## Credits\n\n* Monolens is inspired by [Project Cambria](https://www.inkandswitch.com/cambria/)\nbut is not as ambitious, and is not currently compatible with it.\n\n* The name of some lenses mimic Tutorial D / relational algebra (Date \u0026 Darwen).\n  See also [Bmg](https://github.com/enspirit/bmg)\n\n## Public API\n\nThis library follows semantics versioning 2.0.\n\n**It has NOT reached 1.0 and is currently unstable.**\n\nAnyway, the public interface will cover at least the following:\n\n* `Monolens.lens` factory method and its behavior\n\n* The list of available lenses, their behavior and available options.\n\n* Exception classes: `Monolens::Error`, `Monolens::LensError`\n\n* bin/monolens, its args, options and general behavior\n\nEverything else is condidered private and may change any time\n(i.e. even on patch releases).\n\n## Contributing\n\nPlease use github issues and pull requests, and favor the latter if possible.\n\n## Licence\n\nThis software is distributed by Enspirit SRL under a MIT Licence. Please\ncontact Bernard Lambeau (blambeau@gmail.com) with any question.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenspirit%2Fmonolens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenspirit%2Fmonolens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenspirit%2Fmonolens/lists"}