All Projects → finagle → Finch

finagle / Finch

Licence: apache-2.0
Scala combinator library for building Finagle HTTP services

Programming Languages

scala
5932 projects
shell
77523 projects

Projects that are alternatives of or similar to Finch

Flask Restx
Fork of Flask-RESTPlus: Fully featured framework for fast, easy and documented API development with Flask
Stars: ✭ 1,050 (-32.35%)
Mutual labels:  rest, json
Behat Api Extension
API extension for Behat, used to ease testing of JSON-based APIs
Stars: ✭ 92 (-94.07%)
Mutual labels:  rest, json
Json Api Dart
JSON:API client for Dart/Flutter
Stars: ✭ 53 (-96.59%)
Mutual labels:  rest, json
Dito
Dito.js is a declarative and modern web framework with a focus on API driven development, based on Objection.js, Koa.js and Vue.js – Released in 2018 under the MIT license, with support by Lineto.com
Stars: ✭ 44 (-97.16%)
Mutual labels:  rest, json
Flickr Sdk
Almost certainly the best Flickr API client in the world for node and the browser
Stars: ✭ 104 (-93.3%)
Mutual labels:  rest, json
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-96.84%)
Mutual labels:  rest, json
Api Client Generator
Angular REST API client generator from Swagger YAML or JSON file with camel case settigs
Stars: ✭ 92 (-94.07%)
Mutual labels:  rest, json
Rest Api Examples
Test and Prototype with Fake Online REST/OAuth 2 APIs Examples
Stars: ✭ 13 (-99.16%)
Mutual labels:  rest, json
Swagger Express Ts
Generate and serve swagger.json
Stars: ✭ 102 (-93.43%)
Mutual labels:  rest, json
Kaizen Openapi Editor
Eclipse Editor for the Swagger-OpenAPI Description Language
Stars: ✭ 97 (-93.75%)
Mutual labels:  rest, json
Hyperpotamus
🥋 YAML/JSON automation scripting 🤺
Stars: ✭ 38 (-97.55%)
Mutual labels:  rest, json
Persianjsonplaceholder
Persian fake REST/GraphQL API for testing and prototyping.
Stars: ✭ 110 (-92.91%)
Mutual labels:  rest, json
Apicache
Simple API-caching middleware for Express/Node.
Stars: ✭ 957 (-38.34%)
Mutual labels:  rest, json
Fetch Plus
🐕 Fetch+ is a convenient Fetch API replacement with first-class middleware support.
Stars: ✭ 116 (-92.53%)
Mutual labels:  rest, json
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+2450.77%)
Mutual labels:  rest, json
Rest
☕ REST: Yoctoframework — https://rest.n2o.dev
Stars: ✭ 71 (-95.43%)
Mutual labels:  rest, json
Droidparts
Stars: ✭ 785 (-49.42%)
Mutual labels:  rest, json
Ps Webapi
(Migrated from CodePlex) Let PowerShell Script serve or command-line process as WebAPI. PSWebApi is a simple library for building ASP.NET Web APIs (RESTful Services) by PowerShell Scripts or batch/executable files out of the box.
Stars: ✭ 24 (-98.45%)
Mutual labels:  rest, json
Restson Rust
Easy-to-use REST client for Rust programming language
Stars: ✭ 93 (-94.01%)
Mutual labels:  rest, json
Invoice As A Service
💰 Simple invoicing service (REST API): from JSON to PDF
Stars: ✭ 106 (-93.17%)
Mutual labels:  rest, json

Finch is a thin layer of purely functional basic blocks atop of Finagle for building composable HTTP APIs. Its mission is to provide the developers simple and robust HTTP primitives being as close as possible to the bare metal Finagle API.

Badges

Build Status Coverage Status Gitter Maven Central

Standard Modules

Finch uses multi-project structure and contains of the following modules:

Additional Modules

Finch's Github organization has even more modules (these are, however, not published regularly; reach out if you need published artifacts):

Installation

Every Finch module is published at Maven Central. Use the following sbt snippet ...

libraryDependencies ++= Seq(
  "com.github.finagle" %% "[finch-module]" % "[version]"
)

Cats Effect and Twitter Futures

Starting with 0.25, Finch artifacts are published for both Twitter Futures (Endpoint[A]) and Cats Effects (Endpoint[F[_], A]):

  • Use finch-* artifacts for endpoints locked in Twitter Futures (legacy)
  • Use finchx-* artifacts for polymorphic endpoints (recommended)

Hello World!

This "Hello World!" example is built with just finchx-core (polymorphic endpoints):

import io.finch._, cats.effect.IO
import com.twitter.finagle.Http
import com.twitter.util.Await

object Main extends App with Endpoint.Module[IO] {
  val api: Endpoint[IO, String] = get("hello") { Ok("Hello, World!") }
  Await.ready(Http.server.serve(":8080", api.toServiceAs[Text.Plain]))
}

See examples sub-project for more complete examples.

Quickstart

Use finch.g8 template to quickly bootstrap a minimal Finch project:

  • sbt new finch/finch.g8
  • cd helloworld
  • sbt run
  • curl http://localhost:8081/hello

Performance

We use wrk to load test Finch+Circe against Finagle+Jackson to get some insight on how much overhead, an idiomatic Finch application written in a purely functional way, involves on top of Finagle/Jackson. The results are quite impressive (for a pre-1.0 version): Finch performs on 95% of Finagle's throughput.

Here is the first three runs of the benchmark on 2013 MB Pro (2.8 GHz Intel Core i7 w/ 16G RAM).

Benchmark Run 1 Run 2 Run 3
Finagle + Jackson 29014.68 req/s 36783.21 req/s 39924.42 req/s
Finch + Circe 28762.84 req/s 36876.30 req/s 37447.52 req/s

Finch is also load tested against a number of Scala HTTP frameworks and libraries as part of the TechEmpower benchmark. The most recent round showed that Finch performs really well there, scoring a second place across all the Scala libraries.

Documentation

Adopters

Related Projects

Contributing

There are plenty of ways to contribute into Finch:

  • Give it a star
  • Join the Gitter room and leave a feedback or help with answering users' questions
  • Submit a PR (there is an issue label "easy" for newcomers)
  • Be cool and wear a Finch T-Shirt

The Finch project supports the Typelevel code of conduct and wants all of its channels (Gitter, GitHub, etc.) to be welcoming environments for everyone.

Finch is currently maintained by Vladimir Kostyukov, Travis Brown, Ryan Plessner, and Sergey Kolbasov. After the 1.0 release, all pull requests will require two sign-offs by a maintainer to be merged.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].