ocaml-scaleway#
Scaleway SDK for OCaml.
Status#
Early. Currently provides just profile loading — reading credentials and
defaults from ~/.config/scw/config.yaml and environment variables, with
profile merging semantics matching the official scw CLI.
IAM (applications, policies, API keys) and Object Storage (bucket and
object operations) will land once the pure-OCaml HTTP path is in place
via requests.
Installation#
Install with opam:
opam install scaleway
If opam cannot find the package, it may not yet be released in the public
opam-repository. Add the overlay repository, then install it:
opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
opam update
opam install scaleway
Overview#
match Scaleway.Profile.load () with
| Ok p ->
Printf.printf "access-key: %s\nregion: %s\n"
p.access_key p.default_region
| Error e -> prerr_endline e
Configuration sources#
In order of precedence (first wins):
- Environment variables (
SCW_ACCESS_KEY,SCW_SECRET_KEY,SCW_DEFAULT_REGION, etc.) $SCW_CONFIG_PATHor~/.config/scw/config.yaml— named profile$SCW_CONFIG_PATHor~/.config/scw/config.yaml— default profile
Licence#
ISC License. See LICENSE.md for details.