An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.0% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 4.8% dependent repos on proxy.golang.org
Top 9.8% forks on proxy.golang.org

proxy.golang.org : github.com/ipld/go-datalark

datalark makes IPLD data legible to, and constructable in, starlark. Given an IPLD Schema (and optionally, a list of types to focus on), datalark can generate a set of starlark constructor functions for those types. These functions should generally DWIM ("do what I mean"): for structs, they accept kwargs corresponding to the field names, etc. Some functions get clever: for example, for structs with stringy representations (stringjoin, etc), the representation form can be used as an argument to the constructor instead of the kwargs form, and the construction will "DWIM" with that information and parse it in the appropriate way. Standard datamodel data is also always legible, and a set of functions for creating it can also be obtained from the datalark package. All IPLD data exposed to starlark always acts as if it is "frozen", in starlark parlance. This should be unsurprising, since IPLD is already oriented around immutability. datalark can be used on natural golang structs by combining it with the go-ipld-prime/node/bindnode package. This may make it an interesting alternative to github.com/starlight-go/starlight (although admittedly more complicated; it's probably only worth it if you also already value some of the features of IPLD Schemas). Future objectives for this package include the ability to provide a function to starlark which will accept an IPLD Schema document and a type name as parameters, and will return a constructor for that type. (Not yet implemented.)

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ipld/go-datalark
License: Apache-2.0,MIT,Apache-2.0,SSPL-1.0
Latest release: over 2 years ago
First release: over 3 years ago
Namespace: github.com/ipld
Dependent packages: 2
Dependent repositories: 1
Stars: 4 on GitHub
Forks: 3 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 5 days ago

    Loading...
    Readme
    Loading...