Couchbase Capella Python API
Project description
libcapella 1.0.9
Installing
$ pip install libcapella
Create Capella database:
database_name = "test-cluster"
project_name = "test-project"
email = 'john.doe@example.com'
config = CapellaConfig(profile="default")
org = CapellaOrganization(config)
project = CapellaProject(org, project_name, email)
database = CapellaDatabase(project, database_name)
builder = CapellaDatabaseBuilder("aws")
builder = builder.name(database_name)
builder = builder.description("Test cluster")
builder = builder.region("us-east-1")
builder = builder.service_group("4x16", 3, 256)
config = builder.build()
database.create(config)
Credentials Directory
Automation for Capella leverages the v4 public API. To integrate the v4 API with libcapella
, create an API key in the Capella UI and save it to a file named default-api-key-token.txt
in a directory named .capella
in your home directory. Add the email associated with your Capella account to the credentials
file in the default
section.
.capella
├── credentials
├── default-api-key-token.txt
├── project-api-key-token.txt
└── test-api-key-token.txt
Credentials file format:
[default]
api_host = cloudapi.cloud.couchbase.com
token_file = default-api-key-token.txt
account_email = john.doe@example.com
[project]
token_file = project-api-key-token.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
libcapella-1.0.9.tar.gz
(12.6 kB
view hashes)
Built Distribution
libcapella-1.0.9-py3-none-any.whl
(22.6 kB
view hashes)
Close
Hashes for libcapella-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be92df7b6baeb7121afd7c882a7d317ce75ecbdd0a29c0a42cd16c08d6ffc3a |
|
MD5 | 69e8489a2ee33f8c70b69bf2c31a64ef |
|
BLAKE2b-256 | d2f68646b72f91f1b9857e67d0460f6c2de0d1b3cf8e515a14b7ae61d0a0fd2a |