Metadata-Version: 2.1
Name: libcapella
Version: 1.0.10
Summary: Couchbase Capella Python API
Keywords: couchbase,capella,api
Author: Michael Minichino
Author-email: info@unix.us.com
Requires-Python: >=3.8,<4
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: attrs (>=23.1.0)
Requires-Dist: restfull (>=1.0.10)
Project-URL: Homepage, https://github.com/mminichino/capella-api
Description-Content-Type: text/markdown

# libcapella 1.0.10

## 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
```

