Popularity
9.9
Stable
Activity
9.2
Growing
24,773
689
2,465

Programming language: Go
License: BSD 3-clause "New" or "Revised" License
Tags: Web Frameworks     MVC    
Latest version: v12.1.8

Iris alternatives and similar packages

Based on the "Web Frameworks" category.
Alternatively, view Iris alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Iris or a related project?

Add another 'Web Frameworks' Package

README

<!-- Black Lives Matter

News

This is the under-development branch - contains the latest and greatest features. Stay tuned for the upcoming release [v12.2.0](HISTORY.md#Next). Looking for a more stable release? Head over to the v12.1.8 branch instead.

Try the official Iris Command Line Interface today!

Due to the large workload, there may be delays in answering your questions. -->

<!-- Iris version 12.1.8 has been [released](HISTORY.md#su-16-february-2020--v1218)! -->

Iris Web Framework

build status view examples chat <!--FOSSA Status--> donate <!--report card--><!--godocs--> <!-- release -->

<!-- -->

Iris is a fast, simple yet fully featured and very efficient web framework for Go.

It provides a beautifully expressive and easy to use foundation for your next website or API.

package main

import "github.com/kataras/iris/v12"

func main() {
  app := iris.New()
  app.Use(iris.Compression)

  app.Get("/", func(ctx iris.Context) {
    ctx.HTML("Hello <strong>%s</strong>!", "World")
  })

  app.Listen(":8080")
}

<!-- More with simple Handler

package main

import "github.com/kataras/iris/v12"

type (
  request struct {
    Firstname string `json:"firstname"`
    Lastname  string `json:"lastname"`
  }

  response struct {
    ID      string `json:"id"`
    Message string `json:"message"`
  }
)

func main() {
  app := iris.New()
  app.Handle("PUT", "/users/{id:uuid}", updateUser)
  app.Listen(":8080")
}

func updateUser(ctx iris.Context) {
  id := ctx.Params().Get("id")

  var req request
  if err := ctx.ReadJSON(&req); err != nil {
    ctx.StopWithError(iris.StatusBadRequest, err)
    return
  }

  resp := response{
    ID:      id,
    Message: req.Firstname + " updated successfully",
  }
  ctx.JSON(resp)
}

Read the routing examples for more!

Handler with custom input and output arguments

https://github.com/kataras/iris/blob/master/_examples/dependency-injection/basic/main.go

Interesting? Read the examples.

Party Controller (NEW)

Head over to the full running example!

MVC

package main

import (
  "github.com/kataras/iris/v12"
  "github.com/kataras/iris/v12/mvc"
)

type (
  request struct {
    Firstname string `json:"firstname"`
    Lastname  string `json:"lastname"`
  }

  response struct {
    ID      uint64 `json:"id"`
    Message string `json:"message"`
  }
)

func main() {
  app := iris.New()
  mvc.Configure(app.Party("/users"), configureMVC)
  app.Listen(":8080")
}

func configureMVC(app *mvc.Application) {
  app.Handle(new(userController))
}

type userController struct {
  // [...dependencies]
}

func (c *userController) PutBy(id uint64, req request) response {
  return response{
    ID:      id,
    Message: req.Firstname + " updated successfully",
  }
}

Want to see more? Navigate through [mvc examples](_examples/mvc)!

API Guide HOT

package main

import (
  // [other packages...]

  "github.com/kataras/iris/v12"
)

func main() {
  iris.NewGuide().
    AllowOrigin("*").
    Compression(true).
    Health(true, "development", "kataras").
    Timeout(0, 20*time.Second, 20*time.Second).
    Middlewares(basicauth.New(...)).
    Services(
        // NewDatabase(),
        // NewPostgresRepositoryRegistry,
        // NewUserService,
    ).
    API("/users", new(UsersAPI)).
    Listen(":80")
}

-->

As one Go developer once said, Iris got you covered all-round and standing strong over the years.

Some of the features Iris offers:

  • HTTP/2 (Push, even Embedded data)
  • Middleware (Accesslog, Basicauth, CORS, gRPC, Anti-Bot hCaptcha, JWT, MethodOverride, ModRevision, Monitor, PPROF, Ratelimit, Anti-Bot reCaptcha, Recovery, RequestID, Rewrite)
  • API Versioning
  • Model-View-Controller
  • Websockets
  • gRPC
  • Auto-HTTPS
  • Builtin support for ngrok to put your app on the internet, the fastest way
  • Unique Router with dynamic path as parameter with standard types like :uuid, :string, :int... and the ability to create your own
  • Compression
  • View Engines (HTML, Django, Amber, Handlebars, Pug/Jade and more)
  • Create your own File Server and host your own WebDAV server
  • Cache
  • Localization (i18n, sitemap)
  • Sessions
  • Rich Responses (HTML, Text, Markdown, XML, YAML, Binary, JSON, JSONP, Protocol Buffers, MessagePack, Content Negotiation, Streaming, Server-Sent Events and more)
  • Response Compression (gzip, deflate, brotli, snappy, s2)
  • Rich Requests (Bind URL Query, Headers, Form, Text, XML, YAML, Binary, JSON, Validation, Protocol Buffers, MessagePack and more)
  • Dependency Injection (MVC, Handlers, API Routers)
  • Testing Suite
  • And the most important... you get fast answers and support from the 1st day until now - that's six full years!

Learn what others saying about Iris and star this open-source project to support its potentials.

Benchmarks: Jul 18, 2020 at 10:46am (UTC)

๐Ÿ‘‘ Supporters

With your help, we can improve Open Source web development for everyone!

@github is now sponsoring you for $550.00 one time.

A note from your new sponsor:

To celebrate Maintainer Month we want to thank you for all you do for the open source community. Check out our blog post to learn more about how GitHub is investing in maintainers. https://github.blog/2022-06-24-thank-you-to-our-maintainers/

Donations from China are now accepted!

๐Ÿ“– Learning Iris

Installation

The only requirement is the Go Programming Language.

Create a new project

$ mkdir myapp
$ cd myapp
$ go mod init myapp
$ go get github.com/kataras/iris/v12@master # or @v12.2.0-beta6

Install on existing project

$ cd myapp
$ go get github.com/kataras/iris/v12@master

Run

$ go mod tidy -compat=1.19
$ go run .

Iris contains extensive and thorough documentation making it easy to get started with the framework.

<!-- Iris contains extensive and thorough wiki making it easy to get started with the framework. -->

<!-- -->

For a more detailed technical documentation you can head over to our godocs. And for executable code you can always visit the [./_examples](_examples) repository's subdirectory.

Do you like to read while traveling?

follow author on twitter

follow Iris web framework on twitter

follow Iris web framework on facebook

You can request a PDF and online access of the Iris E-Book (New Edition, future v12.2.0+) today and be participated in the development of Iris.

๐Ÿ™Œ Contributing

We'd love to see your contribution to the Iris Web Framework! For more information about contributing to the Iris project please check the [CONTRIBUTING.md](CONTRIBUTING.md) file.

List of all Contributors

๐Ÿ›ก Security Vulnerabilities

If you discover a security vulnerability within Iris, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

๐Ÿ“ License

This project is licensed under the [BSD 3-clause license](LICENSE), just like the Go project itself.

The project name "Iris" was inspired by the Greek mythology. <!-- ## Stargazers over time

Stargazers over time -->


*Note that all licence references and agreements mentioned in the Iris README section above are relevant to that project's source code only.