https://github.com/hummingbird-project/hummingbird-valkey
Hummingbird integration with Valkey and Redis
https://github.com/hummingbird-project/hummingbird-valkey
hummingbird redis swift-on-server valkey
Last synced: 27 days ago
JSON representation
Hummingbird integration with Valkey and Redis
- Host: GitHub
- URL: https://github.com/hummingbird-project/hummingbird-valkey
- Owner: hummingbird-project
- License: apache-2.0
- Created: 2025-08-06T13:18:36.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-03-28T10:21:59.000Z (3 months ago)
- Last Synced: 2026-05-01T12:33:36.534Z (about 1 month ago)
- Topics: hummingbird, redis, swift-on-server, valkey
- Language: Swift
- Homepage: https://hummingbird.codes
- Size: 168 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Notice: Notice.txt
Awesome Lists containing this project
README

# Hummingbird Valkey/Redis Interface
Valkey is an open source, in-memory data structure store, used as a database, cache, and message broker.
This is the Hummingbird interface to the [valkey-swift library](https://github.com/valkey-io/valkey-swift.git) a Swift driver for Valkey/Redis. Currently HummingbirdValkey consists of driver for the Hummingbird persist framework.
## Usage
```swift
import Hummingbird
import HummingbirdValkey
let valkey = ValkeyClient(.hostname(valkeyHostname, port: 6379), logger: Logger(label: "Valkey"))
let persist = ValkeyPersistDriver(client: valkeyClient)
// create router and add a GET /valkey/{key} and PUT /valkey/{key} routes
let router = Router()
router.get("valkey/{key}") { request, context -> String? in
let key = try context.parameters.require("key")
return try await persist.get(key: .init(key), as: String.self)
}
router.put("valkey/{key}") { request, context in
let key = try context.parameters.require("key")
let value = try request.uri.queryParameters.require("value")
try await persist.set(key: key, value: value)
return HTTPResponse.Status.ok
}
// create application using router
var app = Application(
router: router,
configuration: .init(address: .hostname("127.0.0.1", port: 8080))
)
app.addServices(valkey)
// run hummingbird application
try await app.runService()
```
## Documentation
Reference documentation for HummingbirdValkey can be found [here](https://docs.hummingbird.codes/2.0/documentation/hummingbirdvalkey)