id large_stringlengths 21 131 | source large_stringclasses 1
value | code large_stringlengths 21 49.9k | file_path large_stringlengths 10 108 | repo_url large_stringlengths 26 69 | repo_owner large_stringclasses 763
values | repo_name large_stringlengths 2 34 | repo_description large_stringlengths 0 316 | stars int64 0 2.3k | is_official bool 2
classes | license large_stringclasses 9
values | license_raw large_stringclasses 11
values | authors large listlengths 1 1 | hex_package large_stringclasses 655
values | hex_downloads int64 17 962k ⌀ | fork bool 1
class | archived bool 2
classes | collected_at large_stringlengths 32 32 | commit_sha large_stringlengths 40 40 | schema_version int64 1 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gleam-lang/stdlib/test/gleam/set_test.gleam | github | import gleam/int
import gleam/list
import gleam/set
pub fn size_empty_test() {
assert set.size(set.new()) == 0
}
pub fn size_with_elements_test() {
assert set.new()
|> set.insert(1)
|> set.insert(2)
|> set.size
== 2
}
pub fn size_with_duplicates_test() {
assert set.new()
|> set.insert(1)
... | test/gleam/set_test.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
lustre-labs/lustre/src/lustre/vdom/vattr.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dynamic/decode.{type Decoder}
import gleam/json.{type Json}
import gleam/list
import gleam/order.{type Order}
import gleam/string
import gleam/string_tree.{type StringTree}
import houdini
import lustre/internals/constants
imp... | src/lustre/vdom/vattr.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/working_with_other_formats/app/router.gleam | github | import gleam/http.{Post}
import gleam/int
import gleam/list
import gleam/result
import gleam/string
import gsv
import wisp.{type Request, type Response}
import working_with_other_formats/app/web
pub fn handle_request(req: Request) -> Response {
use req <- web.middleware(req)
use <- wisp.require_method(req, Post)
... | examples/src/working_with_other_formats/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/examples/03-effects/04-local-storage/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import formal/form
import gleam/dynamic.{type Dynamic}
import gleam/dynamic/decode.{type Decoder}
import gleam/int
import gleam/json.{type Json}
import gleam/list
import gleam/result
import lustre
import lustre/attribute
import lustre/eff... | examples/03-effects/04-local-storage/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/examples/05-components/02-attributes-and-events/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import counter
import gleam/int
import lustre
import lustre/attribute
import lustre/element.{type Element}
import lustre/element/html
// MAIN ------------------------------------------------------------------------
pub fn main() {
let... | examples/05-components/02-attributes-and-events/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/stdlib/src/gleam/bool.gleam | github | //// A type with two possible values, `True` and `False`. Used to indicate whether
//// things are... true or false!
////
//// It is often clearer and offers more type safety to define a custom type
//// than to use `Bool`. For example, rather than having a `is_teacher: Bool`
//// field consider having a `role: SchoolR... | src/gleam/bool.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-wisp/wisp/examples/src/logging/app/router.gleam | github | import logging/app/web
import wisp.{type Request, type Response}
// Wisp has functions for logging messages using the BEAM logger.
//
// Messages can be logged at different levels. From most important to least
// important they are:
// - emergency
// - alert
// - critical
// - error
// - warning
// - notice
// - info
... | examples/src/logging/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/examples/05-components/01-basic-setup/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import counter
import lustre
import lustre/attribute
import lustre/element.{type Element}
import lustre/element/html
// MAIN ------------------------------------------------------------------------
pub fn main() {
let app = lustre.sim... | examples/05-components/01-basic-setup/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/examples/03-effects/03-timers/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/float
import gleam/int
import gleam/time/calendar
import gleam/time/duration.{type Duration}
import gleam/time/timestamp.{type Timestamp}
import gleam_community/maths
import lustre
import lustre/attribute.{attribute}
import l... | examples/03-effects/03-timers/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/packages/src/packages/web.gleam | github | import gleam/time/timestamp
import packages/storage
import packages/text_search
pub type Context {
Context(
db: storage.Database,
git_sha: String,
start_time: timestamp.Timestamp,
build_time: timestamp.Timestamp,
search_index: text_search.TextSearchIndex,
static_directory: String,
)
}
| src/packages/web.gleam | https://github.com/gleam-lang/packages | gleam-lang | packages | 📦 Search for Gleam packages | 116 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:45.816590+00:00 | af21c767344d73d7e5b5fd3c9ee6dc2b46b73f1e | 1 |
lustre-labs/lustre/examples/06-server-components/01-basic-setup/src/counter.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/int
import lustre.{type App}
import lustre/attribute
import lustre/element.{type Element}
import lustre/element/html
import lustre/event
// MAIN ------------------------------------------------------------------------
/// T... | examples/06-server-components/01-basic-setup/src/counter.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/working_with_files/app/router.gleam | github | import gleam/bytes_tree
import gleam/http.{Get, Post}
import gleam/list
import gleam/result
import wisp.{type Request, type Response}
import working_with_files/app/web
pub fn handle_request(req: Request) -> Response {
use req <- web.middleware(req)
case wisp.path_segments(req) {
[] -> show_home(req)
["fil... | examples/src/working_with_files/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/stdlib/test/gleeunit/internal/gleam_panic.gleam | github | import gleam/dynamic
pub type GleamPanic {
GleamPanic(
message: String,
file: String,
module: String,
function: String,
line: Int,
kind: PanicKind,
)
}
pub type PanicKind {
Todo
Panic
LetAssert(
start: Int,
end: Int,
pattern_start: Int,
pattern_end: Int,
value: dy... | test/gleeunit/internal/gleam_panic.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-lang/erlang/src/gleam/erlang/port.gleam | github | /// Ports are how code running on the Erlang virtual machine interacts with
/// the outside world. Bytes of data can be sent to and read from ports,
/// providing a form of message passing to an external program or resource.
///
/// For more information on ports see the [Erlang ports documentation][1].
///
/// [1]: htt... | src/gleam/erlang/port.gleam | https://github.com/gleam-lang/erlang | gleam-lang | erlang | 🐙 Types and functions for programs running on Erlang! | 135 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:30.230862+00:00 | 69e604c2092e5e60c0a38fb0e4835f22470d9e20 | 1 |
gleam-lang/stdlib/test/gleam/float_test.gleam | github | import gleam/float
import gleam/int
import gleam/order
import gleam/result
pub fn parse_positive_test() {
assert float.parse("1.23") == Ok(1.23)
}
pub fn parse_positive_with_plus_test() {
assert float.parse("+1.23") == Ok(1.23)
}
pub fn parse_negative_test() {
assert float.parse("-1.23") == Ok(-1.23)
}
pub fn... | test/gleam/float_test.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
lustre-labs/lustre/test/snapshot/query_to_string_test.gleam | github | // IMPORTS ---------------------------------------------------------------------
import birdie
import lustre/dev/query.{
and, attribute, child, class, data, descendant, element, id, style, tag, text,
}
import lustre_test
// ELEMENT QUERIES -------------------------------------------------------------
pub fn tag_qu... | test/snapshot/query_to_string_test.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/stdlib/src/gleam/dynamic.gleam | github | import gleam/dict
/// `Dynamic` data is data that we don't know the type of yet.
/// We likely get data like this from interop with Erlang, or from
/// IO with the outside world.
///
/// This module contains code for forming dynamic data, and the
/// `gleam/dynamic/decode` module contains code for turning dynamic data... | src/gleam/dynamic.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-lang/stdlib/src/gleam/set.gleam | github | import gleam/dict.{type Dict}
import gleam/list
import gleam/result
// A list is used as the dict value as an empty list has the smallest
// representation in Erlang's binary format
@target(erlang)
type Token =
List(Nil)
@target(erlang)
const token = []
@target(javascript)
type Token =
Nil
@target(javascript)
c... | src/gleam/set.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-wisp/wisp/test/wisp/csrf_test.gleam | github | import gleam/http
import gleam/http/request
import gleam/list
import gleam/result
import helper
import wisp
import wisp/simulate
const expected_cookie_value = "123"
fn cookies_handler_with_csrf_protection(
request: wisp.Request,
callback: fn() -> t,
) -> wisp.Response {
use request <- wisp.csrf_known_header_pro... | test/wisp/csrf_test.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/stdlib/test/gleam/order_test.gleam | github | import gleam/int
import gleam/list
import gleam/order.{Eq, Gt, Lt}
pub fn negate_lt_test() {
assert order.negate(Lt) == Gt
}
pub fn negate_eq_test() {
assert order.negate(Eq) == Eq
}
pub fn negate_gt_test() {
assert order.negate(Gt) == Lt
}
pub fn to_int_lt_test() {
assert order.to_int(Lt) == -1
}
pub fn t... | test/gleam/order_test.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-lang/should_assertions/test/gleam_should_assertions_test.gleam | github | import gleam/should
pub fn hello_world_test() {
"Hi"
|> should.equal("Hi")
}
| test/gleam_should_assertions_test.gleam | https://github.com/gleam-lang/should_assertions | gleam-lang | should_assertions | ☝️ EUnit compatible assertion functions for use in tests | 6 | true | Apache-2.0 | Apache 2.0 | [
"gleam-lang"
] | gleam_should_assertions | 2,641 | false | true | 2026-05-28T15:54:09.838444+00:00 | 0926f5d2197c2af5d7b15d6eeea97389b6c1b872 | 1 |
lustre-labs/lustre/examples/01-basics/03-view-functions/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/int
import lustre
import lustre/attribute
import lustre/element.{type Element}
import lustre/element/html
import lustre/event
// MAIN ------------------------------------------------------------------------
pub fn main() {
... | examples/01-basics/03-view-functions/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/stdlib/test/gleam/option_test.gleam | github | import gleam/option.{None, Some}
pub fn all_some_test() {
assert option.all([Some(1), Some(2), Some(3)]) == Some([1, 2, 3])
}
pub fn all_empty_test() {
assert option.all([]) == Some([])
}
pub fn all_with_none_test() {
assert option.all([Some(1), None, Some(3)]) == None
}
pub fn is_some_with_some_test() {
as... | test/gleam/option_test.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-lang/http/test/gleam/http/response_test.gleam | github | import gleam/http.{Http}
import gleam/http/cookie
import gleam/http/response.{Response}
import gleam/option.{None, Some}
import gleam/string
pub fn redirect_test() {
let response = response.redirect("/other")
assert 303 == response.status
assert Ok("/other") == response.get_header(response, "location")
}
pub fn... | test/gleam/http/response_test.gleam | https://github.com/gleam-lang/http | gleam-lang | http | 🕸️ Types and functions for HTTP clients and servers! | 276 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:02.224913+00:00 | da44e896606b498dd9e004e3d8480e4c08f47d23 | 1 |
lustre-labs/ui/src/lustre/ui/tooltip.gleam | github | //// <script>
//// const docs = [
//// {
//// header: "Elements",
//// functions: [
//// "register",
//// "view",
//// "popover",
//// "trigger",
//// ]
//// },
//// {
//// header: "Attributes",
//// sort: true,
//// functions: [
//// "align",
//// "defa... | src/lustre/ui/tooltip.gleam | https://github.com/lustre-labs/ui | lustre-labs | ui | A collection of components and design tokens for building Lustre apps. | 159 | true | MIT | MIT | [
"lustre-labs"
] | null | null | false | false | 2026-05-28T15:40:19.494898+00:00 | a7f2deab9fbde907397a61f75fb211910831c47d | 1 |
lustre-labs/lustre/src/lustre/element/keyed.gleam | github | //// Lustre uses something called a _virtual DOM_ to work out what has changed
//// between renders and update the DOM accordingly. That means when you render
//// items in a list, Lustre will walk through the list of items and compare them
//// in order to see if they have changed.
////
//// This is often fine but it ... | src/lustre/element/keyed.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/src/lustre.gleam | github | //// Lustre is a library for rendering Web applications and components using
//// Gleam. This module contains the core API for constructing and communicating
//// with Lustre applications. If you're new to Lustre or frontend development in
//// general, make sure you check out the [examples](https://github.com/lustre-l... | src/lustre.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/src/lustre/internals/constants.gleam | github | //// Gleam's runtime representation of types in JavaScript is not quite clever
//// enough to notice that empty containers or nullary constructors can be
//// initialised once and reused every time they are needed.
////
//// This might sound like a micro-optimisation, but things like empty lists and
//// dicts are *inc... | src/lustre/internals/constants.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/bitwise/src/gleam/bitwise.gleam | github | //// A set of functions for bitwise operations on integers.
/// Calculates the bitwise AND of its arguments.
@deprecated("Please use the bitwise functions in gleam/int")
pub fn and(x: Int, y: Int) -> Int {
do_and(x, y)
}
@external(erlang, "erlang", "band")
@external(javascript, "../gleam_bitwise.mjs", "and")
fn do_... | src/gleam/bitwise.gleam | https://github.com/gleam-lang/bitwise | gleam-lang | bitwise | 🍓 Bitwise operations on integers | 12 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | true | 2026-05-28T15:47:44.104325+00:00 | 514d3650a1db8d98a7b1deedd6a28b39f83b1e83 | 1 |
lustre-labs/ui/src/lustre/ui/tabs/root.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/bool
import gleam/dict
import gleam/dynamic/decode
import gleam/json
import gleam/option.{type Option, None, Some}
import gleam/result
import gleam/string
import lustre
import lustre/attribute.{type Attribute, attribute}
impo... | src/lustre/ui/tabs/root.gleam | https://github.com/lustre-labs/ui | lustre-labs | ui | A collection of components and design tokens for building Lustre apps. | 159 | true | MIT | MIT | [
"lustre-labs"
] | null | null | false | false | 2026-05-28T15:40:19.494898+00:00 | a7f2deab9fbde907397a61f75fb211910831c47d | 1 |
lustre-labs/lustre/examples/06-server-components/02-attributes-and-events/src/counter.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dynamic/decode
import gleam/int
import gleam/json
import gleam/result
import lustre
import lustre/attribute.{type Attribute}
import lustre/component
import lustre/effect.{type Effect}
import lustre/element.{type Element}
impo... | examples/06-server-components/02-attributes-and-events/src/counter.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/examples/02-inputs/02-decoding-events/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dynamic/decode
import gleam/int
import lustre
import lustre/attribute
import lustre/element.{type Element}
import lustre/element/html
import lustre/event
// MAIN --------------------------------------------------------------... | examples/02-inputs/02-decoding-events/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/stdlib/src/gleam/function.gleam | github | /// Takes a single argument and always returns its input value.
///
pub fn identity(x: a) -> a {
x
}
| src/gleam/function.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-wisp/wisp/examples/src/working_with_cookies/app/web.gleam | github | import wisp
pub fn middleware(
req: wisp.Request,
handle_request: fn(wisp.Request) -> wisp.Response,
) -> wisp.Response {
let req = wisp.method_override(req)
use <- wisp.log_request(req)
use <- wisp.rescue_crashes
use req <- wisp.handle_head(req)
use req <- wisp.csrf_known_header_protection(req)
handle... | examples/src/working_with_cookies/app/web.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/ui/src/lustre_ui/shortid.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/bool
import gleam/int
import gleam/string
// CONSTANTS -------------------------------------------------------------------
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const letters_size = 52
con... | src/lustre_ui/shortid.gleam | https://github.com/lustre-labs/ui | lustre-labs | ui | A collection of components and design tokens for building Lustre apps. | 159 | true | MIT | MIT | [
"lustre-labs"
] | null | null | false | false | 2026-05-28T15:40:19.494898+00:00 | a7f2deab9fbde907397a61f75fb211910831c47d | 1 |
lustre-labs/ui/src/lustre/ui/tabs/trigger.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dict
import gleam/dynamic/decode
import gleam/json
import gleam/option.{type Option, None, Some}
import lustre
import lustre/attribute.{type Attribute, attribute}
import lustre/component
import lustre/effect.{type Effect}
imp... | src/lustre/ui/tabs/trigger.gleam | https://github.com/lustre-labs/ui | lustre-labs | ui | A collection of components and design tokens for building Lustre apps. | 159 | true | MIT | MIT | [
"lustre-labs"
] | null | null | false | false | 2026-05-28T15:40:19.494898+00:00 | a7f2deab9fbde907397a61f75fb211910831c47d | 1 |
lustre-labs/lustre/examples/03-effects/05-dom-effects/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dynamic/decode
import gleam/int
import lustre
import lustre/attribute
import lustre/effect.{type Effect}
import lustre/element.{type Element}
import lustre/element/html
import lustre/event
// MAIN ---------------------------... | examples/03-effects/05-dom-effects/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/test/integration/simulate_test.gleam | github | // IMPORTS ---------------------------------------------------------------------
import birdie
import gleam/int
import gleam/json
import gleam/list
import gleam/string
import lustre/attribute
import lustre/dev/query.{data, element}
import lustre/dev/simulate
import lustre/element
import lustre/element/html
import lust... | test/integration/simulate_test.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/website/src/website/fs.gleam | github | import filepath
import gleam/bit_array
import gleam/crypto
import gleam/io
import gleam/list
import gleam/result
import gleam/string
import simplifile
import snag
pub type File {
/// A file with some content
HtmlPage(path: String, content: String)
/// A file with some content
File(path: String, content: String... | src/website/fs.gleam | https://github.com/gleam-lang/website | gleam-lang | website | 🏡 Gleam's website and guide | 132 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:33.671000+00:00 | fbac945d9fc5e6815da1308e61735b9b3b5a2bfc | 1 |
lustre-labs/ui/src/lustre/ui/tabs/panel.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/bool
import gleam/dict
import gleam/dynamic/decode
import gleam/json
import gleam/option.{type Option, None, Some}
import gleam/result
import lustre
import lustre/attribute.{type Attribute}
import lustre/component
import lust... | src/lustre/ui/tabs/panel.gleam | https://github.com/lustre-labs/ui | lustre-labs | ui | A collection of components and design tokens for building Lustre apps. | 159 | true | MIT | MIT | [
"lustre-labs"
] | null | null | false | false | 2026-05-28T15:40:19.494898+00:00 | a7f2deab9fbde907397a61f75fb211910831c47d | 1 |
lustre-labs/lustre/test/integration/client_runtime_test.gleam | github | @target(javascript)
import booklet
@target(javascript)
import gleam/int
@target(javascript)
import gleam/list
@target(javascript)
import gleam/string
@target(javascript)
import lustre
@target(javascript)
import lustre/attribute
@target(javascript)
import lustre/element.{type Element}
@target(javascript)
import lustre/e... | test/integration/client_runtime_test.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/using_a_database/app/web.gleam | github | import tiny_database
import wisp
// A new Context type, which holds any additional data that the request handlers
// need in addition to the request.
//
// Here it is holding a database connection, but it could hold anything else
// such as API keys, IO performing functions (so they can be swapped out in
// tests for ... | examples/src/using_a_database/app/web.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/otp/src/gleam/otp/internal/result2.gleam | github | /// An alernative ok type used within Erlang/OTP
pub type Result2(data1, data2, error) {
Ok(data1, data2)
Error(error)
}
| src/gleam/otp/internal/result2.gleam | https://github.com/gleam-lang/otp | gleam-lang | otp | 📫 Fault tolerant multicore programs with actors | 854 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:50.769608+00:00 | 4d91278e2aac5694b1120a85dfb571e84f098926 | 1 |
gleam-lang/stdlib/src/gleam/float.gleam | github | //// Functions for working with floats.
////
//// ## Float representation
////
//// Floats are represented as 64 bit floating point numbers on both the Erlang
//// and JavaScript runtimes. The floating point behaviour is native to their
//// respective runtimes, so their exact behaviour will be slightly different on
//... | src/gleam/float.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-wisp/wisp/examples/src/using_a_database/app/web/people.gleam | github | import gleam/dict
import gleam/dynamic/decode
import gleam/http.{Get, Post}
import gleam/json
import gleam/result.{try}
import tiny_database
import using_a_database/app/web.{type Context}
import wisp.{type Request, type Response}
// This request handler is used for requests to `/people`.
//
pub fn all(req: Request, ct... | examples/src/using_a_database/app/web/people.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/otp/src/gleam/otp/factory_supervisor.gleam | github | //// A supervisor where child processes are started dynamically from a
//// pre-specified template, so new processes can be created as needed
//// while the program is running.
////
//// When the supervisor is shut down it shuts down all its children
//// concurrently and in no specified order.
////
//// For further de... | src/gleam/otp/factory_supervisor.gleam | https://github.com/gleam-lang/otp | gleam-lang | otp | 📫 Fault tolerant multicore programs with actors | 854 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:50.769608+00:00 | 4d91278e2aac5694b1120a85dfb571e84f098926 | 1 |
gleam-lang/hackney/src/gleam/hackney.gleam | github | import gleam/bit_array
import gleam/bytes_tree.{type BytesTree}
import gleam/dynamic.{type Dynamic}
import gleam/http
import gleam/http/request.{type Request}
import gleam/http/response.{type Response, Response}
import gleam/list
import gleam/result
import gleam/string
import gleam/uri
pub type Error {
InvalidUtf8Re... | src/gleam/hackney.gleam | https://github.com/gleam-lang/hackney | gleam-lang | hackney | 🪝 Make requests to HTTP servers with Hackney | 61 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:41:46.456098+00:00 | c691c40f2e4f26215f5f145a5bc50740a3b537d0 | 1 |
lustre-labs/ui/src/lustre_ui/dom/element.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dynamic.{type Dynamic}
import gleam/dynamic/decode
import gleam/order.{type Order}
import gleam/result
import lustre/effect.{type Effect}
// TYPES -----------------------------------------------------------------------
///
... | src/lustre_ui/dom/element.gleam | https://github.com/lustre-labs/ui | lustre-labs | ui | A collection of components and design tokens for building Lustre apps. | 159 | true | MIT | MIT | [
"lustre-labs"
] | null | null | false | false | 2026-05-28T15:40:19.494898+00:00 | a7f2deab9fbde907397a61f75fb211910831c47d | 1 |
gleam-wisp/wisp/examples/src/working_with_json/app/router.gleam | github | import gleam/dynamic/decode
import gleam/http.{Post}
import gleam/json
import gleam/result
import wisp.{type Request, type Response}
import working_with_json/app/web
// This type is going to be parsed and decoded from the request body.
pub type Person {
Person(name: String, is_cool: Bool)
}
// To decode the type we... | examples/src/working_with_json/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/cowboy/test/gleam/http/cowboy_test.gleam | github | import gleam/bytes_tree.{type BytesTree}
import gleam/hackney
import gleam/http.{Get, Head, Http, Post}
import gleam/http/cookie
import gleam/http/cowboy
import gleam/http/request.{type Request}
import gleam/http/response.{type Response}
import gleam/list
pub fn echo_service(request: Request(BitArray)) -> Response(Byt... | test/gleam/http/cowboy_test.gleam | https://github.com/gleam-lang/cowboy | gleam-lang | cowboy | 🤠 A Gleam HTTP service adapter for the Cowboy web server | 75 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:41:24.843043+00:00 | 47a166f32520ca3e3b06b8345d27fa024b2f1662 | 1 |
gleam-wisp/wisp/examples/src/using_a_database/app/router.gleam | github | import using_a_database/app/web.{type Context}
import using_a_database/app/web/people
import wisp.{type Request, type Response}
pub fn handle_request(req: Request, ctx: Context) -> Response {
use req <- web.middleware(req)
// A new `app/web/people` module now contains the handlers and other functions
// relatin... | examples/src/using_a_database/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/src/lustre/component.gleam | github | //// Lustre's component system is built on top of the Custom Elements API and
//// the Shadow DOM API. This module helps you configure new components and
//// interact with existing ones.
////
//// While it's not required, understanding the spec and how it works will help
//// you get the most out of Lustre's component... | src/lustre/component.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/examples/06-server-components/03-event-include/src/chat.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dynamic/decode
import gleam/int
import gleam/list
import lustre
import lustre/attribute
import lustre/element.{type Element}
import lustre/element/html
import lustre/element/keyed
import lustre/event
import lustre/server_comp... | examples/06-server-components/03-event-include/src/chat.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/packages/src/packages/storage.gleam | github | import gleam/bool
import gleam/dict.{type Dict}
import gleam/dynamic/decode.{type Decoder}
import gleam/float
import gleam/hexpm
import gleam/int
import gleam/json.{type Json}
import gleam/list
import gleam/option.{type Option}
import gleam/order
import gleam/result
import gleam/set.{type Set}
import gleam/string
impor... | src/packages/storage.gleam | https://github.com/gleam-lang/packages | gleam-lang | packages | 📦 Search for Gleam packages | 116 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:45.816590+00:00 | af21c767344d73d7e5b5fd3c9ee6dc2b46b73f1e | 1 |
lustre-labs/lustre/dev/build.gleam | github | // IMPORTS ---------------------------------------------------------------------
import esgleam
import esgleam/mod/install
import gleam/regexp.{Options}
import gleam/result
import gleam/string
import shellout
import simplifile
// MAIN ------------------------------------------------------------------------
pub fn ma... | dev/build.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/working_with_files/app.gleam | github | import gleam/erlang/process
import mist
import wisp
import wisp_mist
import working_with_files/app/router
pub fn main() {
wisp.configure_logger()
let secret_key_base = wisp.random_string(64)
let assert Ok(_) =
wisp_mist.handler(router.handle_request, secret_key_base)
|> mist.new
|> mist.port(8000)
... | examples/src/working_with_files/app.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/test/snapshot/html_test.gleam | github | // IMPORTS ---------------------------------------------------------------------
import birdie
import gleam/dynamic/decode
import gleam/int
import gleam/json
import lustre
import lustre/attribute
import lustre/component
import lustre/effect
import lustre/element.{type Element}
import lustre/element/html
import lustre/... | test/snapshot/html_test.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/json/test/gleam_json_js_ffi_test.gleam | github | @target(javascript)
import gleam/json.{type DecodeError, UnexpectedByte, UnexpectedEndOfInput}
@target(javascript)
import gleeunit/should
@target(javascript)
type StandardError {
StandardError(message: String)
}
// === End of input tests === //
@target(javascript)
pub fn chromium_end_of_input_test() {
"Unexpected... | test/gleam_json_js_ffi_test.gleam | https://github.com/gleam-lang/json | gleam-lang | json | 🐑 Work with JSON in Gleam! | 147 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:23.926745+00:00 | 9792d8a5ec14e03760f8ccbc8992dff4d45105fe | 1 |
gleam-wisp/wisp/test/wisp/simulate_test.gleam | github | import gleam/http
import gleam/http/response
import gleam/json
import gleam/list
import gleam/option.{None}
import gleam/string
import simplifile
import wisp
import wisp/simulate
pub fn request_test() {
let request = simulate.request(http.Patch, "/wibble/woo")
assert request.method == http.Patch
assert request.h... | test/wisp/simulate_test.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/stdlib/src/gleam/bytes_tree.gleam | github | //// `BytesTree` is a type used for efficiently building binary content to be
//// written to a file or a socket. Internally it is represented as a tree so to
//// append or prepend to a bytes tree is a constant time operation that
//// allocates a new node in the tree without copying any of the content. When
//// writ... | src/gleam/bytes_tree.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
gleam-lang/website/src/website/news.gleam | github | import filepath
import gleam/io
import gleam/list
import gleam/option
import gleam/result
import gleam/string
import gleam/time/calendar
import jot
import lustre/attribute.{class} as attr
import lustre/element
import lustre/element/html
import snag
import website/fs
import website/page.{PageMeta}
import website/site
p... | src/website/news.gleam | https://github.com/gleam-lang/website | gleam-lang | website | 🏡 Gleam's website and guide | 132 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:33.671000+00:00 | fbac945d9fc5e6815da1308e61735b9b3b5a2bfc | 1 |
lustre-labs/lustre/test/snapshot/query_find_test.gleam | github | // IMPORTS ---------------------------------------------------------------------
import birdie
import gleam/list
import gleam/string
import lustre/attribute
import lustre/dev/query.{
and, attribute, child, class, data, descendant, find_all, style, tag, text,
}
import lustre/element
import lustre/element/html
import ... | test/snapshot/query_find_test.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/test/working_with_form_data/app_test.gleam | github | import gleam/http
import gleam/string
import wisp/simulate
import working_with_form_data/app/router
pub fn view_form_test() {
let response = router.handle_request(simulate.browser_request(http.Get, "/"))
assert response.status == 200
assert response.headers == [#("content-type", "text/html; charset=utf-8")]
... | examples/test/working_with_form_data/app_test.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/src/lustre/element/html.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/json
import lustre/attribute.{type Attribute}
import lustre/element.{type Element, element, namespaced}
import lustre/internals/constants
// HTML ELEMENTS: MAIN ROOT ----------------------------------------------------
///
... | src/lustre/element/html.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
lustre-labs/lustre/test/benchmark/diff_benchmark.gleam | github | import birdie
import exception
import gleam/int
import gleam/list
import gleamy/bench
import lustre/element.{type Element}
import lustre/element/html
import lustre/element/keyed
import lustre/vdom/cache
import lustre/vdom/diff
const duration = bench.Duration(5000)
const warmup = bench.Warmup(100)
pub fn benchmark_10... | test/benchmark/diff_benchmark.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-lang/erlang/src/gleam/erlang/node.gleam | github | //// Multiple Erlang VM instances can form a cluster to make a distributed
//// Erlang system, talking directly to each other using messages rather than
//// other communication protocols like HTTP. In a distributed Erlang system
//// each virtual machine is called a _node_. This module provides Node related
//// types... | src/gleam/erlang/node.gleam | https://github.com/gleam-lang/erlang | gleam-lang | erlang | 🐙 Types and functions for programs running on Erlang! | 135 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:30.230862+00:00 | 69e604c2092e5e60c0a38fb0e4835f22470d9e20 | 1 |
lustre-labs/lustre/src/lustre/internals/mutable_map.gleam | github | /// A `MutableMap` functions like Gleam's `Dict` and exposes a subset of the same
/// api. As the name implies, there are some important things to know:
///
/// - On the JavaScript target, updates to the map are performed **in-place** and
/// will mutate the map directly.
///
/// - On the JavaScript target, keys in t... | src/lustre/internals/mutable_map.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/serving_static_assets/app/router.gleam | github | import serving_static_assets/app/web.{type Context}
import wisp.{type Request, type Response}
const html = "<!DOCTYPE html>
<html lang=\"en\">
<head>
<meta charset=\"utf-8\">
<title>Wisp Example</title>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<link rel=\"stylesheet\" ... | examples/src/serving_static_assets/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/examples/04-applications/01-routing/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import gleam/dict.{type Dict}
import gleam/int
import gleam/list
import gleam/uri.{type Uri}
import lustre
import lustre/attribute.{type Attribute}
import lustre/effect.{type Effect}
import lustre/element.{type Element}
import lustre/elem... | examples/04-applications/01-routing/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/logging/app.gleam | github | import gleam/erlang/process
import logging/app/router
import mist
import wisp
import wisp_mist
pub fn main() {
wisp.configure_logger()
let secret_key_base = wisp.random_string(64)
let assert Ok(_) =
wisp_mist.handler(router.handle_request, secret_key_base)
|> mist.new
|> mist.port(8000)
|> mist.... | examples/src/logging/app.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-wisp/wisp/examples/src/routing/app/router.gleam | github | import gleam/http.{Get, Post}
import routing/app/web
import wisp.{type Request, type Response}
pub fn handle_request(req: Request) -> Response {
use req <- web.middleware(req)
// Wisp doesn't have a special router abstraction, instead we recommend using
// regular old pattern matching. This is faster than a rou... | examples/src/routing/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-wisp/wisp/test/helper.gleam | github | import exception
import wisp
pub fn disable_logger(f: fn() -> t) -> t {
wisp.set_logger_level(wisp.CriticalLevel)
use <- exception.defer(fn() { wisp.set_logger_level(wisp.InfoLevel) })
f()
}
| test/helper.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-lang/packages/src/packages/periodic.gleam | github | import gleam/erlang/process.{type Subject}
import gleam/otp/actor
import gleam/string
import packages/error.{type Error}
import wisp
pub opaque type Message {
Rerun
}
type State(a) {
State(self: Subject(Message), work: fn() -> Result(a, Error), interval: Int)
}
/// Repeatedly call a function, leaving `interval` ... | src/packages/periodic.gleam | https://github.com/gleam-lang/packages | gleam-lang | packages | 📦 Search for Gleam packages | 116 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:40:45.816590+00:00 | af21c767344d73d7e5b5fd3c9ee6dc2b46b73f1e | 1 |
gleam-lang/stdlib/src/gleam/bit_array.gleam | github | //// BitArrays are a sequence of binary data of any length.
import gleam/int
import gleam/order
import gleam/string
/// Converts a UTF-8 `String` type into a `BitArray`.
///
@external(erlang, "gleam_stdlib", "identity")
@external(javascript, "../gleam_stdlib.mjs", "bit_array_from_string")
pub fn from_string(x: String... | src/gleam/bit_array.gleam | https://github.com/gleam-lang/stdlib | gleam-lang | stdlib | 🎁 Gleam's standard library | 684 | true | Apache-2.0 | Apache-2.0 | [
"gleam-lang"
] | null | null | false | false | 2026-05-28T15:39:52.754630+00:00 | c6f7ceee9c569c71849d7e4c5a94e535feaae724 | 1 |
lustre-labs/lustre/src/lustre/effect.gleam | github | //// In many frontend frameworks it's common for components to perform side effects
//// whenever the need them. An event handler might make an HTTP request, or a
//// component might reach into the DOM to focus an input.
////
//// In Lustre we try to keep side effects separate from our main program loop.
//// This com... | src/lustre/effect.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/wisp_mist/test/wisp_mist_test.gleam | github | import gleam/http/request
import gleam/httpc
import gleeunit
import mist
import wisp
import wisp_mist
pub fn main() -> Nil {
gleeunit.main()
}
pub fn mist_adapter_test() {
let secret_key_base = wisp.random_string(64)
let handler =
wisp_mist.handler(
fn(_) { wisp.ok() |> wisp.string_body("Hello, world!... | wisp_mist/test/wisp_mist_test.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
lustre-labs/lustre/examples/06-server-components/03-event-include/src/app.gleam | github | // IMPORTS ---------------------------------------------------------------------
import chat
import gleam/bytes_tree
import gleam/erlang/application
import gleam/erlang/process.{type Selector, type Subject}
import gleam/http/request.{type Request}
import gleam/http/response.{type Response}
import gleam/json
import gle... | examples/06-server-components/03-event-include/src/app.gleam | https://github.com/lustre-labs/lustre | lustre-labs | lustre | A Gleam web framework for building HTML templates, single page applications, and real-time server components. | 2,302 | true | MIT | MIT | [
"lustre-labs"
] | lustre | 245,785 | false | false | 2026-05-28T15:39:45.871015+00:00 | c573707a57aef3542d84e7e18008cd38e62b9edf | 1 |
gleam-wisp/wisp/examples/src/hello_world/app/router.gleam | github | import hello_world/app/web
import wisp.{type Request, type Response}
/// The HTTP request handler- your application!
///
pub fn handle_request(req: Request) -> Response {
// Apply the middleware stack for this request/response.
use _req <- web.middleware(req)
// Later we'll use templates, but for now a string ... | examples/src/hello_world/app/router.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
gleam-wisp/wisp/examples/src/serving_static_assets/app.gleam | github | import gleam/erlang/process
import mist
import serving_static_assets/app/router
import serving_static_assets/app/web.{Context}
import wisp
import wisp_mist
pub fn main() {
wisp.configure_logger()
let secret_key_base = wisp.random_string(64)
// A context is constructed holding the static directory path.
let ct... | examples/src/serving_static_assets/app.gleam | https://github.com/gleam-wisp/wisp | gleam-wisp | wisp | 🧚 A practical web framework for Gleam | 1,425 | true | Apache-2.0 | Apache-2.0 | [
"gleam-wisp"
] | wisp | 238,038 | false | false | 2026-05-28T15:39:49.436337+00:00 | f346bfffa4b176d09971d17783f7032ee96d0552 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.