https://github.com/qri-io/starlib
qri's standard library for starlark
https://github.com/qri-io/starlib
Last synced: 23 days ago
JSON representation
qri's standard library for starlark
- Host: GitHub
- URL: https://github.com/qri-io/starlib
- Owner: qri-io
- License: mit
- Created: 2018-09-16T02:07:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T04:13:57.000Z (over 1 year ago)
- Last Synced: 2025-03-29T12:11:13.466Z (about 1 month ago)
- Language: Go
- Homepage:
- Size: 575 KB
- Stars: 124
- Watchers: 6
- Forks: 30
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starlark - Starlib - Qri's standard library for (Libraries and extensions)
- awesome-starlark - Starlib
README
Starlib - Starlark's Missing standard Library.
[](https://qri.io) [](http://godoc.org/github.com/qri-io/starlib) [](./LICENSE) [](https://codecov.io/gh/qri-io/starlib) [](https://circleci.com/gh/qri-io/starlib)
## Welcome
This is a community-driven project to bring a standard library to the starlark programming dialect. We here at Qri need a standard library, and we thought it might benefit others to structure this library in a reusable way. We are a little biased towards our needs, and will be shaping the library primarily toward's Qri's use case.
| Question | Answer |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| "What's starlark?" | It's a python-like scripting language open-sourced by Google. [Here are the docs](https://docs.bazel.build/versions/master/skylark/language.html) |
| "What's the use-case for this?" | [We're building it for Qri ('query')](https://qri.io) |
| "I want to play with starlib outside of Qri" | [Checkout the starlark playground](https://github.com/qri-io/skypg) |
| "I have a question" | [Create an issue](https://github.com/qri-io/starlib/issues) |
| "I found a bug" | [Create an issue](https://github.com/qri-io/starlib/issues) |
| "I would like to propose a new package" | You should think about [creating an RFC](https://github.com/qri-io/rfcs) |## Packages
The following is a list of the packages currently in the standard library
| Package | Go Docs | Description |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| [`bsoup`](https://github.com/qri-io/starlib/tree/master/bsoup) |[](https://godoc.org/github.com/qri-io/starlib/bsoup) | a beautiful-soup-like API for working with HTML |
| [`encoding/base64`](https://github.com/qri-io/starlib/tree/master/encoding/base64) |[](https://godoc.org/github.com/qri-io/starlib/encoding/base64) | base64 de/serialization |
| [`encoding/csv`](https://github.com/qri-io/starlib/tree/master/encoding/csv) |[](https://godoc.org/github.com/qri-io/starlib/encoding/csv) | csv de/serialization |
| [`encoding/json`](https://github.com/qri-io/starlib/tree/master/encoding/json) |[](https://godoc.org/github.com/qri-io/starlib/encoding/json) | alias for [go.starlark.net/starlarkjson](https://github.com/google/starlark-go/blob/master/starlarkjson/json.go) |
| [`encoding/yaml`](https://github.com/qri-io/starlib/tree/master/encoding/yaml) |[](https://godoc.org/github.com/qri-io/starlib/encoding/yaml) | yaml de/serialization |
| [`geo`](https://github.com/qri-io/starlib/tree/master/geo) |[](https://godoc.org/github.com/qri-io/starlib/geo) | 2d geographic operations |
| [`hash`](https://github.com/qri-io/starlib/tree/master/hash) |[](https://godoc.org/github.com/qri-io/starlib/hash) | hash operations (md5/sha1/sha256) |
| [`html`](https://github.com/qri-io/starlib/tree/master/html) |[](https://godoc.org/github.com/qri-io/starlib/html) | html text processing |
| [`http`](https://github.com/qri-io/starlib/tree/master/http) |[](https://godoc.org/github.com/qri-io/starlib/http) | http client operations |
| [`math`](https://pkg.go.dev/go.starlark.net/lib/math) |[](https://pkg.go.dev/go.starlark.net/lib/math) | mathematical functions & values [upstreamed into go-starlark](https://github.com/google/starlark-go/pull/357) |
| [`re`](https://github.com/qri-io/starlib/tree/master/re) |[](https://godoc.org/github.com/qri-io/starlib/re) | regular expressions |
| [`time`](https://github.com/google/starlark-go/blob/master/lib/time/time.go) |[](https://pkg.go.dev/go.starlark.net/lib/time) | time operations, [upstreamed into go-starlark](https://github.com/google/starlark-go/pull/327) |
| [`xlsx`](https://github.com/qri-io/starlib/tree/master/xlsx) |[](https://godoc.org/github.com/qri-io/starlib/xlsx) | xlsx file format reading |
| [`zipfile`](https://github.com/qri-io/starlib/tree/master/zipfile) |[](https://godoc.org/github.com/qri-io/starlib/zipfile) | support for zip archives |
###### This documentation has been adapted from the [Cycle.js](https://github.com/cyclejs/cyclejs) documentation.