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 to fetch the OpenAPI specifications and to provide access points to use the API.
Include the library in your project. When using deps.edn
:
com.monkeyprojects/clj-scw-client {:mvn/version "<VERSION>"}
Or with Leiningen:
[com.monkeyprojects/clj-scw-client "<VERSION>"]
Then 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. Also check out the excellent
Manifold library for more functions
for async processing.
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 |
Encryption keys | key-mgr-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.
These tend to build upon the existing AWS libraries, which do tend to pull in lots of additional dependencies, so it may be that we will provide a more lightweight implementation of our own, but for the time being, you will have to rely on the existing libraries.
Copyright (c) 2025 by Monkey Projects BV.
Can you improve this documentation?Edit on Codeberg
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close