{"id":19951361,"url":"https://github.com/grimen/python-attributedict","last_synced_at":"2025-05-03T18:34:00.877Z","repository":{"id":57412527,"uuid":"138461963","full_name":"grimen/python-attributedict","owner":"grimen","description":"A dictionary object with attributes support - for Python.","archived":false,"fork":false,"pushed_at":"2020-03-29T13:34:30.000Z","size":39,"stargazers_count":19,"open_issues_count":8,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T19:51:57.285Z","etag":null,"topics":["attribute","attributes","custom","data","dict","dictionary","object","properties","property","python","struct"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/attributedict","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/grimen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-24T07:20:56.000Z","updated_at":"2025-04-02T15:17:11.000Z","dependencies_parsed_at":"2022-08-24T19:10:22.089Z","dependency_job_id":null,"html_url":"https://github.com/grimen/python-attributedict","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimen%2Fpython-attributedict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimen%2Fpython-attributedict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimen%2Fpython-attributedict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimen%2Fpython-attributedict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grimen","download_url":"https://codeload.github.com/grimen/python-attributedict/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252236834,"owners_count":21716482,"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":["attribute","attributes","custom","data","dict","dictionary","object","properties","property","python","struct"],"created_at":"2024-11-13T01:07:47.224Z","updated_at":"2025-05-03T18:34:00.527Z","avatar_url":"https://github.com/grimen.png","language":"Python","readme":"\n# `attributedict` [![PyPI version](https://badge.fury.io/py/attributedict.svg)](https://badge.fury.io/py/attributedict) [![Build Status](https://travis-ci.com/grimen/python-attributedict.svg?branch=master)](https://travis-ci.com/grimen/python-attributedict) [![Coverage Status](https://codecov.io/gh/grimen/python-attributedict/branch/master/graph/badge.svg)](https://codecov.io/gh/grimen/python-attributedict)\n\n*A dictionary object with attributes support.*\n\n\n## Install\n\nInstall using **pip**:\n\n```sh\n$ pip install attributedict\n```\n\n\n## Use\n\nExample:\n\n```python\nfrom attributedict.collections import AttributeDict\n\ndata = AttributeDict({'foo': {'bar': [1, 2, 3]}})\n\ndata.foo # =\u003e `{'bar': [1, 2, 3]}}`\ndata.foo.bar # =\u003e `[1, 2, 3]`\n\ndata.foo = {'baz': True}\ndata.foo = # =\u003e `{'baz': True}`\n\ndel data.foo.baz\n\n# and/or...\n\ndata = AttributeDict({'foo': {'bar': [1, 2, 3]}})\n\ndata['foo'] # =\u003e `{'bar': [1, 2, 3]}}`\ndata['foo']['bar'] # =\u003e `[1, 2, 3]`\n\ndata['foo'] = {'baz': True}\ndata['foo'] = # =\u003e `{'baz': True}`\n\ndel data['foo']['baz']\n\n# instance of `dict`...\n\nisinstance(data, dict) # =\u003e True\nisinstance(data, attributedict.collections.AttributeDict) # =\u003e True\n\nisinstance(data.__dict__, dict) # =\u003e True\nisinstance(data.__dict__, attributedict.collections.AttributeDict) # =\u003e False\n\n# no need for custom encoders...\n\ndata = AttributeDict({'foo': {'bar': [1, 2, 3]}})\n\njson.dumps(data) # =\u003e `{\"foo\": {\"bar\": [1, 2, 3]}}`\njson.dumps(data.__dict__) # =\u003e `{\"foo\": {\"bar\": [1, 2, 3]}}`\n\n# etc.\n\n```\n\n\n## Test\n\nClone down source code and run:\n\n```sh\n$ make install\n$ make test\n```\n\n\n## License\n\nReleased under the MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimen%2Fpython-attributedict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrimen%2Fpython-attributedict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimen%2Fpython-attributedict/lists"}