Skip to content

feat: re-export curated code_table constants from package root - #53

Open
acul71 wants to merge 1 commit into
masterfrom
issue-46
Open

feat: re-export curated code_table constants from package root#53
acul71 wants to merge 1 commit into
masterfrom
issue-46

Conversation

@acul71

@acul71 acul71 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #46.

  • Re-export a curated set of commonly used named codec constants from the top-level multicodec package
  • Add tests/test_exports.py covering identity, values, and __all__ membership
  • Add newsfragment 46.feature.rst

Full set remains available via from multicodec.code_table import ….

Demo

>>> from multicodec import SHA2_256, DAG_CBOR, IP4
>>> SHA2_256, int(SHA2_256), SHA2_256.name
(Code('sha2-256', 0x12), 18, 'sha2-256')
>>> DAG_CBOR, IP4
dag-cbor ip4

Test plan

  • make lint / typecheck / test / docs-ci locally
  • Newsfragment 46.feature.rst present
  • CI green on this PR
  • Review requested from @sumanjeet0012

Made with Cursor

Closes #46.

Co-authored-by: Cursor <cursoragent@cursor.com>
@acul71

acul71 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@sumanjeet0012 Could you please review this PR when you have a chance? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export code_table named constants from top-level __init__.py

1 participant