# Moya/Moya

Network abstraction layer written in Swift.

Repository: https://github.com/Moya/Moya
Canonical: https://ross.abutalabs.com/products/moya
Homepage: https://moya.github.io
Language: Swift
License: MIT
License Family: permissive
Topics: swift, reactiveswift, rxswift, alamofire, networking, hacktoberfest
Last push: 2026-07-14T22:07:40+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 8, longevity 100
- inputs: {"age_days": 4400, "days_push": 50, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 15358, forks 2000 (observed 2026-08-28T04:11:09.704622+00:00)

## What it is
Moya is a Swift network abstraction layer that encapsulates Alamofire calls behind typed, enum-based API endpoints. It provides compile-time endpoint checking and first-class test stubs for easy unit testing of network code.

## Use cases
- abstract api networking in an ios app
- replace ad hoc apimanager network layers in swift
- define api endpoints with swift enums
- unit test network requests with stubs
- wrap alamofire behind a cleaner interface

## When to choose
- you build iOS/macOS apps in Swift and already use Alamofire
- you want compile-time checked, enum-based endpoint definitions
- easy network stubbing for unit tests is a priority

## When to avoid
- you need a cross-platform HTTP client outside the Apple/Swift ecosystem
- you prefer direct control of URLSession or lightweight request code
- your project doesn't use Alamofire or reactive frameworks

## Facets
- artifact type: library
- maturity: stable
- function: http-client, middleware, testing
- domain: web-development, developer-tools, apis
- platform: -
- tags: alamofire, network-abstraction, api-client, reactive-extensions, unit-testing-stubs, swift, ios, macos

## Member repositories
- Moya/Moya (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:09.704622+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:06:21.249043+00:00, confidence not recorded.
  - readme: https://github.com/Moya/Moya (fetched 2026-08-28T04:11:09.704622+00:00, sha a0eb8736764b)
  - homepage: https://moya.github.io (fetched 2026-08-29T08:04:08.297237+00:00, sha 89c2c86e6e5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
