This is a Clojure library that provides client functionality to access the Scaleway API. Scaleway is a Europe-based public cloud provider.
This library uses [Martian]*(https://github.com/oliyh/martian) to fetch the OpenAPI specifications and to provide access points to use the API.
Include the library in your project:
# deps.edn
{com.monkeyprojects/clj-scw-client {:mvn/version "<VERSION>"}}
Or with Leiningen:
[com.monkeyprojects/clj-scw-client "<VERSION>"]
The require the monkey.scw.core
and the martian.core
namespaces, and you're
ready to invoke the API.
(require '[martian.core :as mc])
(require '[monkey.scw.core :as c])
;; Create a context, for example to access containers
;; Notice that you need to specify a secret key for authentication.
(def ctx (c/containers-ctx {:secret-key "my-very-secret-key"}))
;; Explore the api, see which operations are available
(mc/explore ctx) ; => [[:list-namespaces "Lists namespaces"] ...]
;; Or explore a specific endpoint
(mc/explore ctx :list-namespaces) ; => Displays required parameters, etc.
;; Invoke an endpoint
@(mc/response-for ctx :list-namespaces {:region "fr-par"})
;; => Returns a `deref`able value that will hold the response, including headers, body...
Since we're using Aleph, all responses are asynchronous. This
allows you to send multiple requests in parallel. You do need to deref
each response
in order to get to the result.
Currently, these api's are available. In order to use them, invoke the associated function to create a context that accesses the endpoint.
|---|---|
|API|Context function|
|---|---|
|Instances|instance-ctx
|
|Serverless containers|containers-ctx
|
|Serverless functions|functions-ctx
|
|Serverless jobs|jobs-ctx
|
|Container registry|registry-ctx
|
|NATS messaging|nats-ctx
|
|Secrets|secrets-ctx
|
|Domains and DNS|domain-ctx
|
|---|---|
A special case is object storage, which exposes an AWS S3 compatible API. We don't provide functionality for that here, as several libraries already exist that provide that functionality.
Copyright (c) 2025 by Monkey Projects BV.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close