twc-cli 1.0.0rc0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of twc-cli might be problematic. Click here for more details.

@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ # 0.1.0
4
+
5
+ Initial release.
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2023 TWC Developers
4
+
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the “Software”), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.1
2
+ Name: twc-cli
3
+ Version: 1.0.0rc0
4
+ Summary: Timeweb Cloud Command Line Interface.
5
+ Home-page: https://github.com/timeweb-cloud/twc
6
+ License: MIT
7
+ Author: ge
8
+ Author-email: dev@timeweb.cloud
9
+ Requires-Python: >=3.7,<4.0
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Requires-Dist: click (>=8.1.3,<9.0.0)
18
+ Requires-Dist: click-aliases (>=1.0.1,<2.0.0)
19
+ Requires-Dist: pygments (>=2.14.0,<3.0.0)
20
+ Requires-Dist: pyyaml (>=6.0,<7.0)
21
+ Requires-Dist: requests (>=2.28.1,<3.0.0)
22
+ Requires-Dist: toml (>=0.10.2,<0.11.0)
23
+ Project-URL: Repository, https://github.com/timeweb-cloud/twc
24
+ Description-Content-Type: text/markdown
25
+
26
+ ![TWC CLI](https://github.com/timeweb-cloud/twc/blob/master/artwork/logo.svg)
27
+
28
+ Timeweb Cloud Command Line Interface and simple SDK 💫
29
+
30
+ > [Документация на русском](https://github.com/timeweb-cloud/twc/blob/master/docs/ru/README.md) 🇷🇺
31
+
32
+ # Installation
33
+
34
+ ```
35
+ pip install twc-cli
36
+ ```
37
+
38
+ # Getting started
39
+
40
+ Get Timeweb Cloud [access token](https://timeweb.cloud/my/api-keys) and
41
+ configure **twc** with command:
42
+
43
+ ```
44
+ twc config
45
+ ```
46
+
47
+ Enter your access token and hit `Enter`.
48
+
49
+ Configuration done! Let's use:
50
+
51
+ ```
52
+ twc --help
53
+ ```
54
+
55
+ # Shell completion
56
+
57
+ ## Bash
58
+
59
+ Add this to **~/.bashrc**:
60
+
61
+ ```
62
+ eval "$(_TWC_COMPLETE=bash_source twc)"
63
+ ```
64
+
65
+ ## Zsh
66
+
67
+ Add this to **~/.zshrc**:
68
+
69
+ ```
70
+ eval "$(_TWC_COMPLETE=zsh_source twc)"
71
+ ```
72
+
73
+ ## Fish
74
+
75
+ Add this to **~/.config/fish/completions/tw.fish**:
76
+
77
+ ```
78
+ eval (env _TWC_COMPLETE=fish_source twc)
79
+ ```
80
+
@@ -0,0 +1,54 @@
1
+ ![TWC CLI](https://github.com/timeweb-cloud/twc/blob/master/artwork/logo.svg)
2
+
3
+ Timeweb Cloud Command Line Interface and simple SDK 💫
4
+
5
+ > [Документация на русском](https://github.com/timeweb-cloud/twc/blob/master/docs/ru/README.md) 🇷🇺
6
+
7
+ # Installation
8
+
9
+ ```
10
+ pip install twc-cli
11
+ ```
12
+
13
+ # Getting started
14
+
15
+ Get Timeweb Cloud [access token](https://timeweb.cloud/my/api-keys) and
16
+ configure **twc** with command:
17
+
18
+ ```
19
+ twc config
20
+ ```
21
+
22
+ Enter your access token and hit `Enter`.
23
+
24
+ Configuration done! Let's use:
25
+
26
+ ```
27
+ twc --help
28
+ ```
29
+
30
+ # Shell completion
31
+
32
+ ## Bash
33
+
34
+ Add this to **~/.bashrc**:
35
+
36
+ ```
37
+ eval "$(_TWC_COMPLETE=bash_source twc)"
38
+ ```
39
+
40
+ ## Zsh
41
+
42
+ Add this to **~/.zshrc**:
43
+
44
+ ```
45
+ eval "$(_TWC_COMPLETE=zsh_source twc)"
46
+ ```
47
+
48
+ ## Fish
49
+
50
+ Add this to **~/.config/fish/completions/tw.fish**:
51
+
52
+ ```
53
+ eval (env _TWC_COMPLETE=fish_source twc)
54
+ ```
@@ -0,0 +1,50 @@
1
+ [tool.poetry]
2
+ name = "twc-cli"
3
+ version = "1.0.0rc0"
4
+ description = "Timeweb Cloud Command Line Interface."
5
+ authors = ["ge <dev@timeweb.cloud>"]
6
+ homepage = "https://github.com/timeweb-cloud/twc"
7
+ repository = "https://github.com/timeweb-cloud/twc"
8
+ license="MIT"
9
+ readme = "README.md"
10
+ include = ["CHANGELOG.md", "COPYING"]
11
+ packages = [
12
+ { include = "twc", from = "." }
13
+ ]
14
+
15
+ [tool.poetry.dependencies]
16
+ python = "^3.7"
17
+ requests = "^2.28.1"
18
+ pygments = "^2.14.0"
19
+ click = "^8.1.3"
20
+ click-aliases = "^1.0.1"
21
+ toml = "^0.10.2"
22
+ pyyaml = "^6.0"
23
+
24
+ [tool.poetry.group.dev.dependencies]
25
+ black = "^22.12.0"
26
+ pylint = "^2.16.0"
27
+ vermin = "^1.5.1"
28
+
29
+ [tool.poetry.scripts]
30
+ twc = 'twc.__main__:cli'
31
+
32
+ [build-system]
33
+ requires = ["poetry-core"]
34
+ build-backend = "poetry.core.masonry.api"
35
+
36
+ [tool.black]
37
+ line-length = 79
38
+
39
+ [tool.pylint."MESSAGES CONTROL"]
40
+ disable = [
41
+ "missing-module-docstring",
42
+ "missing-function-docstring",
43
+ "too-many-arguments",
44
+ "too-many-lines",
45
+ "import-outside-toplevel",
46
+ "duplicate-code",
47
+ "unused-argument", # 'verbose' arg is OK
48
+ "redefined-outer-name",
49
+ "invalid-name",
50
+ ]
@@ -0,0 +1,43 @@
1
+ # -*- coding: utf-8 -*-
2
+ from setuptools import setup
3
+
4
+ package_dir = \
5
+ {'': '.'}
6
+
7
+ packages = \
8
+ ['twc', 'twc.api', 'twc.commands']
9
+
10
+ package_data = \
11
+ {'': ['*']}
12
+
13
+ install_requires = \
14
+ ['click-aliases>=1.0.1,<2.0.0',
15
+ 'click>=8.1.3,<9.0.0',
16
+ 'pygments>=2.14.0,<3.0.0',
17
+ 'pyyaml>=6.0,<7.0',
18
+ 'requests>=2.28.1,<3.0.0',
19
+ 'toml>=0.10.2,<0.11.0']
20
+
21
+ entry_points = \
22
+ {'console_scripts': ['twc = twc.__main__:cli']}
23
+
24
+ setup_kwargs = {
25
+ 'name': 'twc-cli',
26
+ 'version': '1.0.0rc0',
27
+ 'description': 'Timeweb Cloud Command Line Interface.',
28
+ 'long_description': '![TWC CLI](https://github.com/timeweb-cloud/twc/blob/master/artwork/logo.svg)\n\nTimeweb Cloud Command Line Interface and simple SDK 💫\n\n> [Документация на русском](https://github.com/timeweb-cloud/twc/blob/master/docs/ru/README.md) 🇷🇺\n\n# Installation\n\n```\npip install twc-cli\n```\n\n# Getting started\n\nGet Timeweb Cloud [access token](https://timeweb.cloud/my/api-keys) and\nconfigure **twc** with command:\n\n```\ntwc config\n```\n\nEnter your access token and hit `Enter`.\n\nConfiguration done! Let\'s use:\n\n```\ntwc --help\n```\n\n# Shell completion\n\n## Bash\n\nAdd this to **~/.bashrc**:\n\n```\neval "$(_TWC_COMPLETE=bash_source twc)"\n```\n\n## Zsh\n\nAdd this to **~/.zshrc**:\n\n```\neval "$(_TWC_COMPLETE=zsh_source twc)"\n```\n\n## Fish\n\nAdd this to **~/.config/fish/completions/tw.fish**:\n\n```\neval (env _TWC_COMPLETE=fish_source twc)\n```\n',
29
+ 'author': 'ge',
30
+ 'author_email': 'dev@timeweb.cloud',
31
+ 'maintainer': 'None',
32
+ 'maintainer_email': 'None',
33
+ 'url': 'https://github.com/timeweb-cloud/twc',
34
+ 'package_dir': package_dir,
35
+ 'packages': packages,
36
+ 'package_data': package_data,
37
+ 'install_requires': install_requires,
38
+ 'entry_points': entry_points,
39
+ 'python_requires': '>=3.7,<4.0',
40
+ }
41
+
42
+
43
+ setup(**setup_kwargs)
@@ -0,0 +1,5 @@
1
+ """Timeweb Cloud Command Line Interface."""
2
+
3
+ from .__version__ import __version__
4
+
5
+ from .api import TimewebCloud
@@ -0,0 +1,21 @@
1
+ """Command Line Interface initial module."""
2
+
3
+ import click
4
+
5
+ from .commands import options, GLOBAL_OPTIONS
6
+ from .commands.account import account
7
+ from .commands.config import config
8
+ from .commands.server import server
9
+ from .commands.ssh_key import ssh_key
10
+
11
+
12
+ @click.group()
13
+ @options(GLOBAL_OPTIONS[:2])
14
+ def cli():
15
+ """Timeweb Cloud Command Line Interface."""
16
+
17
+
18
+ cli.add_command(account)
19
+ cli.add_command(config)
20
+ cli.add_command(server)
21
+ cli.add_command(ssh_key)
@@ -0,0 +1,13 @@
1
+ # __ __ ___
2
+ # /\ \__ /\ `\ /\_ \ __
3
+ # \ \ ,_\ __ __ __ ___\ `\ `\ __\//\ \ /\_\
4
+ # \ \ \//\ \/\ \/\ \ /'___`\ > /'___\ \ \\/\ \
5
+ # \ \ \\ \ \_/ \_/ /\ \__/ / /\ \__/\_\ \\ \ \
6
+ # \ \__\ \___x___/\ \____/\_/\ \____/\____\ \_\
7
+ # \/__/\/__//__/ \/____\// \/____\/____/\/_/
8
+ #
9
+ import sys
10
+
11
+
12
+ __version__ = "1.0.0"
13
+ __pyversion__ = sys.version.replace("\n", "")
@@ -0,0 +1,2 @@
1
+ from .client import TimewebCloud
2
+ from .exceptions import *