Liking cljdoc? Tell your friends :D

Clojure Scaleway API Client

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.

Usage

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.

Available API's

Currently, these api's are available. In order to use them, invoke the associated function to create a context that accesses the endpoint.

APIContext function
Instancesinstance-ctx
Serverless containerscontainers-ctx
Serverless functionsfunctions-ctx
Serverless jobsjobs-ctx
Container registryregistry-ctx
NATS messagingnats-ctx
Secretssecrets-ctx
Encryption keyskey-mgr-ctx
Domains and DNSdomain-ctx

Object Storage

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.

License

MIT License

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