Name | cxn JSON |
Version |
0.0.5
JSON |
| download |
home_page | None |
Summary | CXN (short for Connection) is a lightweight command-line tool to verify connectivity between services |
upload_time | 2024-11-03 15:43:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
automation
cli
command-line
tooling
utility
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# CXN - Connection
[![PyPI - Version](https://img.shields.io/pypi/v/cxn.svg)](https://pypi.org/project/cxn)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cxn.svg)](https://pypi.org/project/cxn)
-----
CXN (short for Connection) is a lightweight command-line tool created to verify connectivity between services. It aims to be as minimalistic as possible by reducing dependency conflicts and utilizing the existing Python environment on your system. The tool leverages pre-installed third-party Python packages to manage connection logic.
## Installation
```console
pip install cxn
```
### Arguments
- `provider`: The name of the third-party Python package that facilitates the connection.
_Note: CXN does not manage the installation of these third-party packages. Ensure that the required packages are installed in your Python environment._
### Options
- `-u`, `--url` (required): Specifies the connection URL for the provider.
- `-t`, `--terminate`: Exits with an error if the connection cannot be established.
- `-v`, `--version`: Displays the program's version number and exits.
- `-b`, `--backoff`: Enables exponential backoff for retrying connections indefinitely unless the `--retries` option is specified.
- `-r`, `--retries`: Specifies the number of retries before giving up. Works with both backoff and non-backoff modes. In backoff mode, defaults to indefinite retries if not specified; in non-backoff mode, defaults to a single attempt.
## Available Providers
You can list the available providers and their supported schemas by using the `-h` or `--help` option.
Currently, the supported providers are:
- **redis**: Supports `redis`
- **psycopg**: Supports `postgresql`
- **kombu**: Supports `amqp`
Stay tuned for more providers coming soon!
## Examples
Check connectivity to a service using a specific provider:
```bash
cxn --url redis://localhost:6379/0 kombu
```
```bash
cxn --url postgresql://user:password@localhost:5432/mydatabase?sslmode=disable psycopg
```
Check connectivity to a service using a specific provider with exponential backoff and unlimited retries:
```bash
cxn --url redis://localhost:6379/0 --backoff kombu
```
Check connectivity to a service with a specific number of retries in both backoff and non-backoff modes:
```bash
cxn --url postgresql://user:password@localhost:5432/mydatabase?sslmode=disable --retries 5 psycopg
```
```bash
cxn --url redis://localhost:6379/0 --backoff --retries 3 kombu
```
## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or suggestions.
## License
`cxn` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": null,
"name": "cxn",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "automation, cli, command-line, tooling, utility",
"author": null,
"author_email": "Artem Lykhvar <me@a10r.com>",
"download_url": "https://files.pythonhosted.org/packages/74/21/f892f5f9f258e1b7ba416e9c51a5e925e795eaae9f099a649a929fbe1b73/cxn-0.0.5.tar.gz",
"platform": null,
"description": "# CXN - Connection\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cxn.svg)](https://pypi.org/project/cxn)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cxn.svg)](https://pypi.org/project/cxn)\n\n-----\n\nCXN (short for Connection) is a lightweight command-line tool created to verify connectivity between services. It aims to be as minimalistic as possible by reducing dependency conflicts and utilizing the existing Python environment on your system. The tool leverages pre-installed third-party Python packages to manage connection logic.\n\n## Installation\n\n```console\npip install cxn\n```\n### Arguments\n\n- `provider`: The name of the third-party Python package that facilitates the connection.\n\n_Note: CXN does not manage the installation of these third-party packages. Ensure that the required packages are installed in your Python environment._\n\n### Options\n\n- `-u`, `--url` (required): Specifies the connection URL for the provider.\n- `-t`, `--terminate`: Exits with an error if the connection cannot be established.\n- `-v`, `--version`: Displays the program's version number and exits.\n- `-b`, `--backoff`: Enables exponential backoff for retrying connections indefinitely unless the `--retries` option is specified.\n- `-r`, `--retries`: Specifies the number of retries before giving up. Works with both backoff and non-backoff modes. In backoff mode, defaults to indefinite retries if not specified; in non-backoff mode, defaults to a single attempt.\n\n## Available Providers\n\nYou can list the available providers and their supported schemas by using the\u00a0`-h`\u00a0or\u00a0`--help`\u00a0option.\n\nCurrently, the supported providers are:\n\n- **redis**: Supports\u00a0`redis`\n- **psycopg**: Supports\u00a0`postgresql`\n- **kombu**: Supports\u00a0`amqp`\n\nStay tuned for more providers coming soon!\n\n## Examples\n\nCheck connectivity to a service using a specific provider:\n\n```bash\ncxn --url redis://localhost:6379/0 kombu\n```\n```bash\ncxn --url postgresql://user:password@localhost:5432/mydatabase?sslmode=disable psycopg\n```\nCheck connectivity to a service using a specific provider with exponential backoff and unlimited retries:\n\n```bash\ncxn --url redis://localhost:6379/0 --backoff kombu\n```\nCheck connectivity to a service with a specific number of retries in both backoff and non-backoff modes:\n\n```bash\ncxn --url postgresql://user:password@localhost:5432/mydatabase?sslmode=disable --retries 5 psycopg\n```\n```bash\ncxn --url redis://localhost:6379/0 --backoff --retries 3 kombu\n```\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request for any improvements or suggestions.\n\n## License\n\n`cxn` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": null,
"summary": "CXN (short for Connection) is a lightweight command-line tool to verify connectivity between services",
"version": "0.0.5",
"project_urls": {
"Documentation": "https://github.com/lykhvar/cxn#readme",
"Issues": "https://github.com/lykhvar/cxn/issues",
"Source": "https://github.com/lykhvar/cxn"
},
"split_keywords": [
"automation",
" cli",
" command-line",
" tooling",
" utility"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d466d5e97a1eae99aa61b70c1750a2fca115e433e859653c431a35a5229f8144",
"md5": "7ccc2c3dda9c3c11b77064fdc0b29820",
"sha256": "85ee28def2634a1effb0b00760fca18d984c4d26fd93f02fbd22e804722c2cfd"
},
"downloads": -1,
"filename": "cxn-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7ccc2c3dda9c3c11b77064fdc0b29820",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6361,
"upload_time": "2024-11-03T15:43:01",
"upload_time_iso_8601": "2024-11-03T15:43:01.773259Z",
"url": "https://files.pythonhosted.org/packages/d4/66/d5e97a1eae99aa61b70c1750a2fca115e433e859653c431a35a5229f8144/cxn-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7421f892f5f9f258e1b7ba416e9c51a5e925e795eaae9f099a649a929fbe1b73",
"md5": "66819d0fd6a471a050b492dccf4e36c9",
"sha256": "a0053afb15b84266f78bc219db2c61add17993b75eeafff1bf7a42cca1892761"
},
"downloads": -1,
"filename": "cxn-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "66819d0fd6a471a050b492dccf4e36c9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6141,
"upload_time": "2024-11-03T15:43:02",
"upload_time_iso_8601": "2024-11-03T15:43:02.874014Z",
"url": "https://files.pythonhosted.org/packages/74/21/f892f5f9f258e1b7ba416e9c51a5e925e795eaae9f099a649a929fbe1b73/cxn-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-03 15:43:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lykhvar",
"github_project": "cxn#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cxn"
}