{"id":15502946,"url":"https://github.com/evuez/ojm","last_synced_at":"2025-08-05T06:12:58.642Z","repository":{"id":71118826,"uuid":"44435869","full_name":"evuez/ojm","owner":"evuez","description":":snake: Object JSON Mapping?","archived":false,"fork":false,"pushed_at":"2015-10-17T12:16:49.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T17:30:15.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/evuez.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}},"created_at":"2015-10-17T12:15:28.000Z","updated_at":"2015-12-23T16:42:18.000Z","dependencies_parsed_at":"2023-03-11T09:56:22.433Z","dependency_job_id":null,"html_url":"https://github.com/evuez/ojm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evuez/ojm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evuez%2Fojm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evuez%2Fojm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evuez%2Fojm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evuez%2Fojm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evuez","download_url":"https://codeload.github.com/evuez/ojm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evuez%2Fojm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268844916,"owners_count":24316088,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"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":[],"created_at":"2024-10-02T09:11:39.683Z","updated_at":"2025-08-05T06:12:58.360Z","avatar_url":"https://github.com/evuez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OJM: Object JSON Mapping?\n\nAllows you to save Python objects to JSON files.\n\nIt's an old piece of code, it seems to kinda work, but the code isn't what you'd call \"pretty\".\n\n# Demo\n\nSee `demo.py` for full classes definition.\n\n```python\nimport ojm\n\n# Define classes...\n\nclass Human(ojm.Model):\n    pass\n    # ...\n\nclass Organ(ojm.Model):\n    pass\n    # ...\n\n\n# Register models\nojm.register(Human)\nojm.register(Organ)\n\n\n# Have fun!\n\njohn = Human('John Doe', 42)\njohn.add_organ(Organ('heart'))\njohn.save()\n\n# `duplicate()` is required to later save this new instance\njane = Human.load(john.uuid).duplicate()\njane.name = 'Jane Doe'\nprint(jane.embedded_organs[0].name)  # heart\njane.save()\n\n\njane.linked_human = john\njane.update()\n\nprint(Human.load(jane.uuid).linked_human.name)  # John Doe\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevuez%2Fojm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevuez%2Fojm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevuez%2Fojm/lists"}