{"id":20924185,"url":"https://github.com/hashberg-io/dag-cbor","last_synced_at":"2025-05-13T16:31:00.220Z","repository":{"id":44950458,"uuid":"406880971","full_name":"hashberg-io/dag-cbor","owner":"hashberg-io","description":"Python implementation of the DAG-CBOR codec for IPLD.","archived":false,"fork":false,"pushed_at":"2023-12-18T22:31:42.000Z","size":227,"stargazers_count":16,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-11T13:48:09.676Z","etag":null,"topics":["cbor","dag-cbor","ipld","multiformats","python"],"latest_commit_sha":null,"homepage":"https://dag-cbor.readthedocs.io","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/hashberg-io.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-15T18:18:45.000Z","updated_at":"2025-03-03T14:58:02.000Z","dependencies_parsed_at":"2023-12-19T01:18:16.466Z","dependency_job_id":"84c24ce8-6d41-4ab4-898e-0d9904af90a2","html_url":"https://github.com/hashberg-io/dag-cbor","commit_stats":{"total_commits":67,"total_committers":2,"mean_commits":33.5,"dds":0.02985074626865669,"last_synced_commit":"93b36f325b17037b8bc4655e3f27606f46bc601b"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashberg-io%2Fdag-cbor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashberg-io%2Fdag-cbor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashberg-io%2Fdag-cbor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashberg-io%2Fdag-cbor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashberg-io","download_url":"https://codeload.github.com/hashberg-io/dag-cbor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837387,"owners_count":21971981,"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":["cbor","dag-cbor","ipld","multiformats","python"],"created_at":"2024-11-18T20:19:54.963Z","updated_at":"2025-05-13T16:30:55.210Z","avatar_url":"https://github.com/hashberg-io.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"dag-cbor: A Python implementation of the `DAG-CBOR codec \u003chttps://ipld.io/specs/codecs/dag-cbor/spec/\u003e`_\n========================================================================================================\n\n.. image:: https://img.shields.io/badge/python-3.7+-green.svg\n    :target: https://docs.python.org/3.7/\n    :alt: Python versions\n\n.. image:: https://img.shields.io/pypi/v/dag-cbor.svg\n    :target: https://pypi.python.org/pypi/dag-cbor/\n    :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/status/dag-cbor.svg\n    :target: https://pypi.python.org/pypi/dag-cbor/\n    :alt: PyPI status\n\n.. image:: http://www.mypy-lang.org/static/mypy_badge.svg\n    :target: https://github.com/python/mypy\n    :alt: Checked with Mypy\n    \n.. image:: https://readthedocs.org/projects/dag-cbor/badge/?version=latest\n    :target: https://dag-cbor.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://github.com/hashberg-io/dag-cbor/actions/workflows/python-pytest.yml/badge.svg\n    :target: https://github.com/hashberg-io/dag-cbor/actions/workflows/python-pytest.yml\n    :alt: Python package status\n\n.. image:: https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square\n    :target: https://github.com/RichardLitt/standard-readme\n    :alt: standard-readme compliant\n\n\nThis is a fully compliant Python implementation of the `DAG-CBOR codec \u003chttps://ipld.io/specs/codecs/dag-cbor/spec/\u003e`_, a subset of the `Concise Binary Object Representation (CBOR) \u003chttps://cbor.io/\u003e`_ supporting the `IPLD Data Model \u003chttps://ipld.io/docs/data-model/\u003e`_ and enforcing a unique (strict) encoded representation of items.\n\n\n.. contents::\n\n\nInstall\n-------\n\nYou can install the latest release from `PyPI \u003chttps://pypi.org/project/dag-cbor/\u003e`_ as follows:\n\n.. code-block:: console\n\n    $ pip install --upgrade dag-cbor\n\n\nUsage\n-----\n\nWe suggest you import DAG-CBOR as follows:\n\n\u003e\u003e\u003e import dag_cbor\n\nBelow are some basic usage examples, to get you started: for detailed documentation, see https://dag-cbor.readthedocs.io/\n\n\nEncoding and decoding\n^^^^^^^^^^^^^^^^^^^^^\n\n\u003e\u003e\u003e dag_cbor.encode({'a': 12, 'b': 'hello!'})\nb'\\xa2aa\\x0cabfhello!'\n\u003e\u003e\u003e dag_cbor.decode(b'\\xa2aa\\x0cabfhello!')\n{'a': 12, 'b': 'hello!'}\n\n\nRandom DAG-CBOR data\n^^^^^^^^^^^^^^^^^^^^\n\n\u003e\u003e\u003e import pprint # pretty-printing\n\u003e\u003e\u003e custom_opts = dict(min_codepoint=0x41, max_codepoint=0x5a, include_cid=False)\n\u003e\u003e\u003e with dag_cbor.random.options(**custom_opts):\n...     for d in dag_cbor.random.rand_dict(3):\n...             pprint.pp(d)\n...\n{'BIQPMZ': b'\\x85\\x1f\\x07/\\xcc\\x00\\xfc\\xaa',\n 'EJEYDTZI': {},\n 'PLSG': {'G': 'JFG',\n          'HZE': -61.278,\n          'JWDRKRGZ': b'-',\n          'OCCKQPDJ': True,\n          'SJOCTZMK': False},\n 'PRDLN': 39.129,\n 'TUGRP': None,\n 'WZTEJDXC': -69.933}\n{'GHAXI': 39.12,\n 'PVUWZLC': 4.523,\n 'TDPSU': 'TVCADUGT',\n 'ZHGVSNSI': [-57, 9, -78.312]}\n{'': 11, 'B': True, 'FWD': {}, 'GXZBVAR': 'BTDWMGI', 'TDICHC': 87}\n\n\n\nAPI\n---\n\nFor the full API documentation, see https://dag-cbor.readthedocs.io/\n\n\nContributing\n------------\n\nPlease see `\u003cCONTRIBUTING.md\u003e`_.\n\n\nLicense\n-------\n\n`MIT © Hashberg Ltd. \u003cLICENSE\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashberg-io%2Fdag-cbor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashberg-io%2Fdag-cbor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashberg-io%2Fdag-cbor/lists"}