Skip to main content

Couchbase Capella Python API

Project description

libcapella 1.0.11

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


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.11.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libcapella-1.0.11-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file libcapella-1.0.11.tar.gz.

File metadata

  • Download URL: libcapella-1.0.11.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/24.0.0

File hashes

Hashes for libcapella-1.0.11.tar.gz
Algorithm Hash digest
SHA256 59bf652f4a859e40ee35d3784114a84a074dc06bf72d07317e2558a2e4c61868
MD5 b2114b0f3bdf1194fe1e9b4b92b5041b
BLAKE2b-256 27fe8aa6ef39d6a14a9f1f94574d0e9f86cbfec1a27cbeaa02abb72e7c900da9

See more details on using hashes here.

File details

Details for the file libcapella-1.0.11-py3-none-any.whl.

File metadata

  • Download URL: libcapella-1.0.11-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/24.0.0

File hashes

Hashes for libcapella-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 96b83c95c2baee446a18a3732e5577d8d694d3556617feb54f5952eec5157b0f
MD5 2c382972c8a87cbbb419f70680f6b98c
BLAKE2b-256 11f28d98e7d922e628bce12053de2d7fe227d96bf4658c758b0a51df9825ce66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page