{"id":19072347,"url":"https://github.com/tvogels/dixi","last_synced_at":"2026-05-13T21:35:21.773Z","repository":{"id":144807850,"uuid":"122731711","full_name":"tvogels/dixi","owner":"tvogels","description":"Dixi - Deep Dictionaries for Python","archived":false,"fork":false,"pushed_at":"2018-02-24T10:48:36.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T04:17:50.517Z","etag":null,"topics":["data-science","nested-objects","python","trees"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvogels.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-24T10:48:10.000Z","updated_at":"2018-09-21T02:01:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e11b949-d63e-4518-bfd2-72cac01d2e6e","html_url":"https://github.com/tvogels/dixi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tvogels/dixi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvogels%2Fdixi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvogels%2Fdixi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvogels%2Fdixi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvogels%2Fdixi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvogels","download_url":"https://codeload.github.com/tvogels/dixi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvogels%2Fdixi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33001254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-science","nested-objects","python","trees"],"created_at":"2024-11-09T01:36:52.262Z","updated_at":"2026-05-13T21:35:21.749Z","avatar_url":"https://github.com/tvogels.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dixi - Deep Dictionaries for Python\n\n## Installation\n```bash\npip install dixi\n```\n\n## Examples\n```python\nfrom dixi import Dixi\n\ndata = Dixi({\n    'Chris': {\n        'age': 25,\n        'address': {\n            'city': 'Amsterdam',\n            'country': 'Netherlands',\n        },\n    },\n    'Anna': {\n        'age': 19,\n        'address': {\n            'city': 'Zürich',\n            'country': 'Switzerland',\n        },\n    },\n    'John': {\n        'age': 44,\n        'address': {\n            'city': 'London',\n            'country': 'United Kingdom',\n        },\n    },\n})\n```\n\n### Deep indexing\n```python\ndata['John', 'age']\n# \u003e\u003e 44\n```\n\n### Partial indexing\n```python\ndata['Chris', 'address']\n# \u003e\u003e {'city': 'Amsterdam', 'country': 'Netherlands'}\n```\n\n### NumpPy style slicing\n```python\ndata[:, 'address', 'country']\n# \u003e\u003e Dixi({'Chris': 'Netherlands', 'Anna': 'Switzerland', 'John': 'United Kingdom'})\ndata[['Chris', 'Anna'], 'age']\n# \u003e\u003e {'Chris': 25, 'Anna': 19}\n```\n\n### Setting\n```python\ndata['Derek', 'hobbies'] = ['Sewing', 'Archery']\n```\n\n### Iteration\n```python\nfor key in data: # or key in data.leafkeys()\n    print(key)\n# \u003e\u003e ('Chris', 'age')\n# \u003e\u003e ('Anna', 'age')\n# \u003e\u003e ('Anna', 'address', 'city')\n# \u003e\u003e ('Anna', 'address', 'country')\n# \u003e\u003e ('John', 'age')\n# \u003e\u003e ('John', 'address', 'city')\n# \u003e\u003e ('John', 'address', 'country')\n# \u003e\u003e ('Derek', 'hobbies')\n```\n```python\nfor key in data.keys():\n    print(key)\n# \u003e\u003e Chris\n# \u003e\u003e Anna\n# \u003e\u003e John\n# \u003e\u003e Derek\n```\n```python\nfor key, value in data.items():\n    print(key, value)\n# \u003e\u003e Chris {'age': 25}\n# \u003e\u003e Anna {'age': 19, 'address': {'city': 'Zürich', 'country': 'Switzerland'}}\n# \u003e\u003e John {'age': 44, 'address': {'city': 'London', 'country': 'United Kingdom'}}\n# \u003e\u003e Derek {'hobbies': ['Sewing', 'Archery']}\n```\n```python\ndata = Dixi({\n    0: {  0: 'a', 1: 'b' },\n    1: { 0: 'c', 1: 'd' },\n})\nfor keys, value in data.iterleaves():\n    print(keys, value)\n# \u003e\u003e (0, 0) a\n# \u003e\u003e (0, 1) b\n# \u003e\u003e (1, 0) c\n# \u003e\u003e (1, 1) d\n```\n\n### Deletion\n```python\ndel data['Chris', 'address']\n```\n\n## Todo\n* Allow indexing for arrays\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvogels%2Fdixi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvogels%2Fdixi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvogels%2Fdixi/lists"}