Ply
A thin layer over fasthttp

One ply over fasthttp.

A thin HTTP layer for Go. Routing, middleware and built-in engines, with the cost of the framework kept visible.

$go get github.com/Dziqha/ply
main.go
package main

import (
    "github.com/Dziqha/ply"
    "github.com/Dziqha/ply/core"
)

func main() {
    app := ply.New()

    app.Get("/users/:id", func(c *core.Context) {
        c.JSON(200, map[string]string{
            "id": c.Param("id"),
        })
    })

    app.RunServer(":8080")
}
Tiered
Routing
fasthttp
Engine
Go
Language

Small surface, nothing hidden

Ply stays close to fasthttp and adds only what a service needs.

Tiered routing

Static, parametric and wildcard routes, compiled for allocation-free matching on the hot path.

  1. 01Static/health
  2. 02Parametric/users/:id
  3. 03Wildcard/assets/*

Built on fasthttp

Ply uses the fasthttp request and response model directly, including its pooled request contexts. Routing, middleware and response helpers sit on top without replacing the engine, and handlers keep access to the underlying fasthttp context.

Small core

Explicit APIs and few abstractions between handler and request.

Built-in engines

Queue, pub/sub and caching, plus graceful shutdown.

QueuePub/SubCacheGraceful shutdown

Start with a single route

Install the module, register a handler, and read the docs when you need more.