diff --git a/.dockerignore b/.dockerignore index 700567f79..e75fe32a2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,33 @@ reference/ .mypy_cache/ .pytest_cache/ .github/ + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Docs +_build/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# pyenv +.python-version diff --git a/README.md b/README.md index f61cb856d..09d7fcca1 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,24 @@ Python wrapper and CLI for [CloudEndure](https://www.cloudendure.com/) ## Installation & Usage -### poetry +### Basic Installation / pip + +```sh +pip install cloudendure +cloudendure version +``` + +### Local Development with Poetry ```sh brew install poetry # if not installed -poetry install cloudendure +poetry install ``` -### pip +### Local Development with Docker ```sh -pip install cloudendure +docker run --rm -it cloudendurepy/cloudendure bash ``` ### Usage diff --git a/cloudendure/api.py b/cloudendure/api.py index 3342b43aa..de787f802 100644 --- a/cloudendure/api.py +++ b/cloudendure/api.py @@ -147,9 +147,17 @@ def login(self, username: str = "", password: str = "", token: str = "") -> bool return True @staticmethod - def get_endpoint(path: str, api_version: str = "latest", host: str = "https://console.cloudendure.com",) -> str: + def get_endpoint(path: str, api_version: str = "latest", host: str = "https://console.cloudendure.com") -> str: """Build the endpoint path. + Args: + path (str): The path to be requested. + api_version (str): The API version to be used. + For example: v5 + Defaults to: latest + host (str): The API URL to be used. + Defaults to: https://console.cloudendure.com + Returns: str: The CloudEndure API endpoint to be used. diff --git a/poetry.lock b/poetry.lock index c1f470e47..7152340c9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -150,7 +150,7 @@ description = "An easy safelist-based HTML-sanitizing tool." name = "bleach" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "3.1.3" +version = "3.1.4" [package.dependencies] six = ">=1.9.0" @@ -170,10 +170,10 @@ description = "The AWS SDK for Python" name = "boto3" optional = false python-versions = "*" -version = "1.12.28" +version = "1.12.30" [package.dependencies] -botocore = ">=1.15.28,<1.16.0" +botocore = ">=1.15.30,<1.16.0" jmespath = ">=0.7.1,<1.0.0" s3transfer = ">=0.3.0,<0.4.0" @@ -183,7 +183,7 @@ description = "Low-level, data-driven core of boto 3." name = "botocore" optional = false python-versions = "*" -version = "1.15.28" +version = "1.15.30" [package.dependencies] docutils = ">=0.10,<0.16" @@ -219,7 +219,7 @@ description = "Checks CloudFormation templates for practices and behaviour that name = "cfn-lint" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.29.0" +version = "0.29.2" [package.dependencies] aws-sam-translator = ">=1.21.0" @@ -455,7 +455,7 @@ marker = "python_version < \"3.8\"" name = "importlib-metadata" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "1.5.0" +version = "1.6.0" [package.dependencies] zipp = ">=0.5" @@ -1549,20 +1549,20 @@ black = [ {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, ] bleach = [ - {file = "bleach-3.1.3-py2.py3-none-any.whl", hash = "sha256:53165a6596e7899c4338d847315fec508110a53bd6fd15c127c2e0d0860264e3"}, - {file = "bleach-3.1.3.tar.gz", hash = "sha256:f8dfd8a7e26443e986c4e44df31870da8e906ea61096af06ba5d5cc2d519842a"}, + {file = "bleach-3.1.4-py2.py3-none-any.whl", hash = "sha256:cc8da25076a1fe56c3ac63671e2194458e0c4d9c7becfd52ca251650d517903c"}, + {file = "bleach-3.1.4.tar.gz", hash = "sha256:e78e426105ac07026ba098f04de8abe9b6e3e98b5befbf89b51a5ef0a4292b03"}, ] boto = [ {file = "boto-2.49.0-py2.py3-none-any.whl", hash = "sha256:147758d41ae7240dc989f0039f27da8ca0d53734be0eb869ef16e3adcfa462e8"}, {file = "boto-2.49.0.tar.gz", hash = "sha256:ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a"}, ] boto3 = [ - {file = "boto3-1.12.28-py2.py3-none-any.whl", hash = "sha256:af09a4f3254fcf6a781ad1a700f702ce15526a25ebe96a14f5cd2ec46e9d924c"}, - {file = "boto3-1.12.28.tar.gz", hash = "sha256:6f113f02f3098b3e37d24caa726a8e81fbc16f6d5cafbf61b7d285b9f7e104e9"}, + {file = "boto3-1.12.30-py2.py3-none-any.whl", hash = "sha256:7f6d41d6e5b763914e867ece72b049476b75093bcb801afeae2aebd20d7f61c8"}, + {file = "boto3-1.12.30.tar.gz", hash = "sha256:b464586003bdfb9ee92463013650f5b62935a7870ed3e8a32aa9111aa142c3f7"}, ] botocore = [ - {file = "botocore-1.15.28-py2.py3-none-any.whl", hash = "sha256:74f81aca90cdbe084bcfa19589bd2c6470bb47dd1fd9635bf5484ecf7577fd61"}, - {file = "botocore-1.15.28.tar.gz", hash = "sha256:21674f491f6bdc886179de644d00dec05276fac292117f86685513006d83fe0a"}, + {file = "botocore-1.15.30-py2.py3-none-any.whl", hash = "sha256:d71f22e81bb17d92a6c3aad9ff04ca79af5f053ac35f6d6f16e1f002aa0655af"}, + {file = "botocore-1.15.30.tar.gz", hash = "sha256:38eef2271ab908979ad7ec7a5cdf334c2a5a0b5e8fe37937c8a76e3ed9c18940"}, ] certifi = [ {file = "certifi-2019.11.28-py2.py3-none-any.whl", hash = "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3"}, @@ -1599,8 +1599,8 @@ cffi = [ {file = "cffi-1.14.0.tar.gz", hash = "sha256:2d384f4a127a15ba701207f7639d94106693b6cd64173d6c8988e2c25f3ac2b6"}, ] cfn-lint = [ - {file = "cfn-lint-0.29.0.tar.gz", hash = "sha256:bceff7ce8556b1e6ea129e9cbf89834561820f63ed1fc96b250015498a041c03"}, - {file = "cfn_lint-0.29.0-py3-none-any.whl", hash = "sha256:594600e461d902b6faf0a276743589dc6db4f9d381d63a22c3a2631a6d5cfd8e"}, + {file = "cfn-lint-0.29.2.tar.gz", hash = "sha256:b41018ad7a49ec4ad07cb00646e2c052dd024db99281111cf53cbb90f72d6104"}, + {file = "cfn_lint-0.29.2-py3-none-any.whl", hash = "sha256:4a94c93fc64ecfd4602d9c2b71d8c622906f6d74f87f37393de4a9516ab36459"}, ] chardet = [ {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, @@ -1722,8 +1722,8 @@ idna = [ {file = "idna-2.8.tar.gz", hash = "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"}, ] importlib-metadata = [ - {file = "importlib_metadata-1.5.0-py2.py3-none-any.whl", hash = "sha256:b97607a1a18a5100839aec1dc26a1ea17ee0d93b20b0f008d80a5a050afb200b"}, - {file = "importlib_metadata-1.5.0.tar.gz", hash = "sha256:06f5b3a99029c7134207dd882428a66992a9de2bef7c2b699b5641f9886c3302"}, + {file = "importlib_metadata-1.6.0-py2.py3-none-any.whl", hash = "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f"}, + {file = "importlib_metadata-1.6.0.tar.gz", hash = "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e"}, ] isort = [ {file = "isort-4.3.21-py2.py3-none-any.whl", hash = "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"}, diff --git a/pyproject.toml b/pyproject.toml index 4471fd82b..00870ecbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cloudendure" -version = "0.2.2" +version = "0.2.3" description = "Python wrapper and CLI for CloudEndure" authors = ["Mark Beacom ", "Tom Warnock "] maintainers = ["Evan Lucchesi ", "Nick Selpa "]