diff --git a/Makefile b/Makefile index 8a0202262..178e20e3d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ SHA1 := $$(git log -1 --pretty=%h) CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD) LATEST_TAG := ${REPO_NAME}:latest GIT_TAG := ${REPO_NAME}:${SHA1} -VERSION := v0.2.1 +VERSION := v0.2.2 info: ## Show information about the current git state. @echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n" diff --git a/cloudendure/__init__.py b/cloudendure/__init__.py index e69de29bb..7b78df4c3 100644 --- a/cloudendure/__init__.py +++ b/cloudendure/__init__.py @@ -0,0 +1,3 @@ +from .cloudendure import CloudEndure + +__all__ = ["CloudEndure"] diff --git a/cloudendure/__version__.py b/cloudendure/__version__.py index 3ced3581b..b5fdc7530 100644 --- a/cloudendure/__version__.py +++ b/cloudendure/__version__.py @@ -1 +1 @@ -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/cloudendure/cloudendure.py b/cloudendure/cloudendure.py index 8406afe95..dc7890504 100644 --- a/cloudendure/cloudendure.py +++ b/cloudendure/cloudendure.py @@ -21,6 +21,7 @@ from .events import Event, EventHandler from .exceptions import CloudEndureHTTPException, CloudEndureMisconfigured from .templates import TerraformTemplate +from .utils import get_user_agent HOST: str = "https://console.cloudendure.com" headers: Dict[str, str] = {"Content-Type": "application/json"} @@ -107,6 +108,25 @@ def __init__( "Failed to authenticate with CloudEndure! Please check your credentials and try again!" ) + def __repr__(self) -> str: + """Provide the representation for the CloudEndure object. + + Returns: + str: The string representation of the CloudEndure object. + + """ + return f"" + + @property + def version(self) -> str: + """Display the CloudEndure module version. + + Returns: + str: The CloudEndure Python module version. + + """ + return get_user_agent() + def _get_role_credentials(self, name: str, role: str) -> Dict[str, Any]: _sts_client: boto_client = boto3.client("sts") diff --git a/cloudendure/config.py b/cloudendure/config.py index 093021970..1ea2faf0c 100644 --- a/cloudendure/config.py +++ b/cloudendure/config.py @@ -62,8 +62,7 @@ def __init__( _config: PosixPath = Path(self.config_path) if not _config.exists(): print( - "No CloudEndure YAML configuration found! Creating it at: (%s)", - self.config_path, + f"No CloudEndure YAML configuration found! Creating it at: ({self.config_path})" ) self.write_yaml_config(config=self.BASE_CONFIG) self.update_config() diff --git a/pyproject.toml b/pyproject.toml index f700ccfa1..a9b22e949 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cloudendure" -version = "0.2.1" +version = "0.2.2" description = "Python wrapper and CLI for CloudEndure" authors = ["Mark Beacom ", "Tom Warnock "] maintainers = ["Evan Lucchesi ", "Nick Selpa "] @@ -13,6 +13,39 @@ include = [ readme = "README.md" repository = "https://github.com/2ndWatch/cloudendure-python" homepage = "https://2ndwatch.github.io/cloudendure-python/" +classifiers = [ + "Environment :: Console", + "Environment :: MacOS X", + "Environment :: Win32 (MS Windows)", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: MacOS", + "Operating System :: MacOS :: MacOS 9", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft", + "Operating System :: Microsoft :: MS-DOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: Microsoft :: Windows :: Windows 10", + "Operating System :: Microsoft :: Windows :: Windows 8.1", + "Operating System :: Microsoft :: Windows :: Windows 8", + "Operating System :: Microsoft :: Windows :: Windows 7", + "Operating System :: Microsoft :: Windows :: Windows Server 2008", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Internet", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: Session", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: User Interfaces", + "Topic :: Utilities", +] [tool.poetry.dependencies] python = "^3.7"