Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK and CLI for CrateDB Cloud Cluster APIs #81

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__
dist
build
.coverage*
.env
coverage.xml
node_modules
/cfr
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Unreleased
- IO: Added the `if-exists` query parameter by updating to influxio 0.4.0.
- Rockset: Added CrateDB Rockset Adapter, a HTTP API emulation layer
- Cloud API: SDK and CLI for CrateDB Cloud Cluster and Import APIs

## 2024/06/18 v0.0.14
- Add `ctk cfr` and `ctk wtf` diagnostics programs
Expand Down
8 changes: 8 additions & 0 deletions cratedb_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@
__version__ = version(__appname__)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"

from .config import preconfigure

preconfigure()

from .api import ManagedCluster # noqa: E402, F401
from .config import configure # noqa: E402, F401
from .model import InputOutputResource, TableAddress # noqa: E402, F401
1 change: 1 addition & 0 deletions cratedb_toolkit/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .main import ManagedCluster # noqa: F401
7 changes: 5 additions & 2 deletions cratedb_toolkit/api/guide.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from cratedb_toolkit.util.croud import table_fqn


class GuidingTexts:
"""
TODO: Add more richness / guidance to the text output.
"""

def __init__(self, admin_url: str = None, table_name: str = None):
def __init__(self, admin_url: str, table_name: str):
self.admin_url = admin_url
self.table_name = table_name
self.table_name = table_fqn(table_name)

def success(self):
return f"""
Expand Down
Loading