{"id":15394276,"url":"https://github.com/xyproto/gnetlark","last_synced_at":"2025-07-11T12:40:43.177Z","repository":{"id":57599091,"uuid":"210335149","full_name":"xyproto/gnetlark","owner":"xyproto","description":":bird: Fast HTTP server that supports handlers written in Starlark","archived":false,"fork":false,"pushed_at":"2024-12-11T12:51:17.000Z","size":3542,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T03:03:55.673Z","etag":null,"topics":["gnet","http","minimalistic","server","starlark"],"latest_commit_sha":null,"homepage":"","language":"Go","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/xyproto.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":"2019-09-23T11:12:36.000Z","updated_at":"2024-12-19T06:14:46.000Z","dependencies_parsed_at":"2024-06-07T21:41:18.947Z","dependency_job_id":"05cabcdf-059d-4139-afa6-637be1b7ed34","html_url":"https://github.com/xyproto/gnetlark","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.1428571428571429,"last_synced_commit":"19f7fc1fee5e502a142657b6374451b59021df98"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgnetlark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgnetlark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgnetlark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fgnetlark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/gnetlark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173061,"owners_count":21224481,"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":["gnet","http","minimalistic","server","starlark"],"created_at":"2024-10-01T15:22:57.202Z","updated_at":"2025-04-15T23:53:25.727Z","avatar_url":"https://github.com/xyproto.png","language":"Go","funding_links":[],"categories":["Users"],"sub_categories":[],"readme":"# \u003cimg src=\"img/gnetlark.png\" width=\"30%\" alt=\"gnetlark logo\"\u003e\n\n[![GoDoc](https://godoc.org/github.com/xyproto/gnetlark?status.svg)](http://godoc.org/github.com/xyproto/gnetlark) [![Go Report Card](https://goreportcard.com/badge/github.com/xyproto/gnetlark)](https://goreportcard.com/report/github.com/xyproto/gnetlark)\n\nFast HTTP server that supports handlers written in Starlark.\n\nPronounced as \"jetlark\", just to keep people on their toes.\n\n### Features and limitations\n\n* It's fast, due to the excellent performance of [gnet](https://github.com/panjf2000/gnet).\n* Starlark is easy to learn and use. It is similar to Python.\n* The selection of functions available from Starlark scripts is currently a bit limited. There is no file or database access.\n* `gnetlark` offers an easy and fun way to try out the Starlark programming language.\n* Support for providing and calling REST/JSON APIs might be added in the future.\n* Serving static files is currently not supported, unless you embed them.\n\n### Installation\n\nQuick installation of the latest version, using Go 1.17 or later:\n\n    go install github.com/xyproto/gnetlark/cmd/gnetlark@latest\n\nAnother way of building and installing the server:\n\n    git clone https://github.com/xyproto/gnetlark\n    cd gnetlark/cmd/gnetlark\n    go build\n    sudo install -Dm755 gnetlark /usr/bin/gnetlark\n\n### Configuration\n\nOne way to allow access to port 80 on Linux:\n\n    sudo setcap cap_net_bind_service=+ep /usr/bin/gnetlark\n\nIt's also possible to specify a port with `--port` or run it as root (not recommended).\n\n### Depends on\n\n* [gnet](https://github.com/panjf2000/gnet), for serving HTTP.\n* [starlark-go](https://github.com/google/starlark-go), for running Starlark scripts.\n\n### Screenshot\n\nScreenshot of a page served by [`index.star`](cmd/gnetlark/index.star), with the server running on port `7711`:\n\n![screenshot](img/screenshot.png)\n\nServed in 0ms:\n\n![performance](img/performance.png)\n\n### Example\n\nA short Starlark script for handling requests and outputting \"Hello, World!\" ([`hello.star`](cmd/gnetlark/hello.star)):\n\n```python\ndef index(status, msg, method, path, date):\n    return \"HTTP/1.1 \" + status + \"\\r\\nServer: gnetlark\\r\\nDate: \" + date + \"\\r\\nContent-Type: text/plain; charset=utf-8\\r\\n\\r\\n\" + \"Hello, World!\"\n```\n\nThe \"Hello World\" page can be served by a command like this:\n\n    gnetlark -main hello.star -port 7711\n\n## General info\n\n* Version: 1.0.2\n* Author: Alexander F. Rødseth \u0026lt;xyproto@archlinux.org\u0026gt;\n* License: BSD-3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fgnetlark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fgnetlark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fgnetlark/lists"}