{"id":13806066,"url":"https://github.com/weskoerber/kewpie","last_synced_at":"2025-04-14T06:14:34.403Z","repository":{"id":221899661,"uuid":"755611590","full_name":"weskoerber/kewpie","owner":"weskoerber","description":"A simple query string parser for Zig.","archived":false,"fork":false,"pushed_at":"2025-04-04T22:37:51.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T06:14:29.180Z","etag":null,"topics":["zig","zig-package","ziglang"],"latest_commit_sha":null,"homepage":"https://weskoerber.github.io/kewpie/","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weskoerber.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":"2024-02-10T18:28:15.000Z","updated_at":"2025-04-04T22:37:54.000Z","dependencies_parsed_at":"2024-04-12T02:38:50.562Z","dependency_job_id":"3537bafe-9a89-4bfe-84e2-1bcee79fd357","html_url":"https://github.com/weskoerber/kewpie","commit_stats":null,"previous_names":["weskoerber/kewpie"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weskoerber%2Fkewpie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weskoerber%2Fkewpie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weskoerber%2Fkewpie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weskoerber%2Fkewpie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weskoerber","download_url":"https://codeload.github.com/weskoerber/kewpie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830407,"owners_count":21168275,"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":["zig","zig-package","ziglang"],"created_at":"2024-08-04T01:01:07.555Z","updated_at":"2025-04-14T06:14:34.390Z","avatar_url":"https://github.com/weskoerber.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![test](https://github.com/weskoerber/kewpie/actions/workflows/test.yaml/badge.svg)](https://github.com/weskoerber/kewpie/actions/workflows/test.yaml)\n[![docs](https://github.com/weskoerber/kewpie/actions/workflows/docs.yaml/badge.svg)](https://github.com/weskoerber/kewpie/actions/workflows/docs.yaml)\n\n# Kewpie\n\nA simple query string parser for zig.\n\n## Getting Started\n\n### Prerequisites\n\n- [Zig](https://ziglang.org/download) (`0.14.0` or newer)\n    - If using Zig `0.12` and `0.13`, use the [`zig-0.12`](https://github.com/weskoerber/kewpie/tree/zig-0.12) branch\n\n### Installation\n\n1. Add kewpie as a dependency in your project using Zig's package manager\n\n    ```console\n    zig fetch --save git+https://github.com/weskoerber/kewpie.git#0.1.1\n    ```\n\n2. Add kewpie module to your `build.zig`\n\n    ```zig\n    const kewpie = b.dependency(\"kewpie\", .{\n        .target = target,\n        .optimize = optimize,\n    });\n    exe.root_module.addImport(\"kewpie\", kewpie.module(\"kewpie\"));\n    ```\n\n### Usage\n\n- Parse entire query string into a hash map\n\n    ```zig\n    const std = @import(\"std\");\n    const kewpie = @import(\"kewpie\");\n\n    pub fn main() !void {\n        var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n        defer if (gpa.deinit() != .ok) @panic(\"leak\");\n\n        const uri = try std.Uri.parse(\"https://example.com?hello=world\");\n\n        const query_params = try kewpie.parse(gpa.allocator(), uri);\n        defer query_params.deinit();\n\n        if (query_params.get(\"hello\")) |value| {\n            // `value` holds the value `world`\n            // ...\n        }\n    }\n    ```\n\n- Parse the query string into an iterator\n\n    ```zig\n    const std = @import(\"std\");\n    const kewpie = @import(\"kewpie\");\n\n    pub fn main() !void {\n        const uri = try std.Uri.parse(\"https://example.com?hello=world\");\n\n        var query_params = kewpie.iter(uri);\n        while (query_params.next()) |param| {\n            // `param` holds a QueryParam struct\n            // ...\n        }\n    }\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweskoerber%2Fkewpie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweskoerber%2Fkewpie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweskoerber%2Fkewpie/lists"}