Name | monero-api-cli JSON |
Version |
0.2.1
JSON |
| download |
home_page | None |
Summary | Cli for interacting with the MoneroDaemon-RPC API |
upload_time | 2024-11-23 00:41:17 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2023 Dvd-Znf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
monero
cli-app
|
VCS |
|
bugtrack_url |
|
requirements |
prompt-toolkit
requests
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Monero-api-cli
![GitHub Release](https://img.shields.io/github/v/release/Dvd-Znf/monero-api-cli?include_prereleases&logo=GitHub&label=Latest%20release%3A&color=lightgreen)
![PyPI - Version](https://img.shields.io/pypi/v/monero-api-cli?logo=Python&label=Latest%20PyPi%20version%3A&color=lightyellow)
![AUR Version](https://img.shields.io/aur/version/monero-api-cli?logo=Arch%20Linux&label=Latest%20AUR%20version%3A)
## Cli for interacting with the MoneroDaemon-RPC API
![Banner](./imgs/Banner.png)
`monero-api-cli` is a Python cli application meant for remotely interacting with a Monero Daemon via its [RPC API](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html)
Under the hood it mostly uses the [Prompt-Toolkit module](https://python-prompt-toolkit.readthedocs.io/en/master/) for its [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) interface and [Requests](https://requests.readthedocs.io/en/latest/) for the actual interaction with the API
## Usage:
```
$ monero-api-cli --help
usage: [-h] [-v] [--daemon-address DAEMON_ADDRESS] [--config-file CONFIG_FILE] {help,get_info} ...
Cli for interacting with the MoneroDaemon-RPC API
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
--daemon-address DAEMON_ADDRESS
Which daemon address to use, format: [IPv4 address]:[Port number]
--config-file CONFIG_FILE
Path to config file
RPC methods:
{help,get_info}
help Help information regarding a command
get_info Invoke the get_info RPC method
```
If you call the app with no additional arguments it will enter into a REPL cli mode otherwise it will just take the argument as a RPC method.
### Available RPC Methods/Arguments:
#### help
![helpimage](./imgs/Screenshot_Help.png)
If no additional arguments are passed it will go into REPL mode
Otherwise it will just take the argument and display the help message associated with it
#### get_info
Calls the get_info RPC method
#### version (REPL only)
Print current version
#### exit (REPL only)
Exit the cli REPL mode
You can also use Ctrl+C to exit
### Available options:
#### -h, --help
Show help message and exits
#### -v, --version
Show current version and exit
#### --daemon-address
Which daemon address to use, format: [IPv4 address]:[Port number]
#### --config-file
Path for a config file
Check Config File section for more details
### Example usage:
![example](./imgs/Screenshot_Usage.png)
## Config File:
Default location for config file is /etc/monero-api-cli/monero-api-cli.config for MacOS/Linux
And C:\ProgramData\MoneroApiCli\monero-api-cli.confg for Windows
Example config file located at root of this repo, named `monero-api-config.config`
``` ini
# Config File INI/TOML like syntax
# Lines starting with # are comments and have their respective default options
[settings]
# Which daemon address to use, format: [IPv4 address]:[Port number]
daemon-address = 127.0.0.1:18081
```
## Dependencies:
Because the app is bundled using pyinstaller dependencies are _not_ required on the binary versions
The dependencies are only required when working direclty with the source
Install all python module dependencies with: `pip install -r requirements.txt`
| Name | PyPi Name | What is it used for? |
| ---- | ------- | -------------------- |
| Python | N/A | Necessary for interpreting source code |
| Requests module | `requests` | Used in the implementation of interacting with the API |
| Prompt Toolkit module | `prompt_toolkit` | Used in the implementation of REPL cli mode |
## How to install
### From AUR package
If you use Arch Linux you know what to do.
Here is the link to the AUR package: https://aur.archlinux.org/packages/monero-api-cli
### From PyPi via pip
`pip install monero-api-cli`
### From repo:
You can either use the source code with the Python interpretor directly
Or you could use the provided binary available at `dist/monero-api-cli` for MacOS/Linux and `dist/monero-api-cli.exe` for Windows
### Step 0:
Clone this repo :P
``` bash
$ git clone https://github.com/Dvd-Znf/monero-api-cli
```
### Step 1 (With binary):
Use the provided binary
Dependencies are already bundled in, you dont need to install anything!
``` bash
$ cd monero-api-cli
$ ./dist/monero-api-cli # MacOS/Linux
```
``` PowerShell
PS> ./dist/monero-api-cli.exe # Windows
```
If you get permisions error add execute permisions with: `chmod +x <path to binary>`
### Step 1 (From source, recommended for development):
Make sure you have all dependencies installed
Then just use the Python interpretor on the `launcher.py` script
``` bash
$ cd monero-api-cli
$ python launcher.py
```
Or you can run the source directly as a module
``` bash
$ python -m src.monero_api_cli
```
## Why make this from zero when python-monero module already exists?
1. This is not meant as a replacement for python-monero module!
Instead, this is an independent cli application for interacting with monerod via its RPC API
i.e. cli-app & no wallet RPC
2. This is mostly meant for monero node operators who would like a nice, intuitive and easy way to interact with their daemon
This is the reason I made this.
3. python-monero last update to its source code was more than a year ago, even tho it could use some improvements, at least to its docs.
This is activly developed.
After first release you may integrate monero-api-cli into whatever you want but thats not my problem/focus.
## Can't you ssh into your node then just use monerod?
Some setups require the daemon to be non-interactive
Also that sound super laaaameeeeeee
## TODO:
- Implement `get_connections` RPC Method
- Implement `get_version` RPC Method
- Implement `/get_height` RPC Method
- Implement `/get_net_stats` RPC Method
### TODO for v1.0.0:
- Implement more of the API :P
Raw data
{
"_id": null,
"home_page": null,
"name": "monero-api-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "monero, cli-app",
"author": null,
"author_email": "Dvd-Znf <email@dvdznf.xyz>",
"download_url": "https://files.pythonhosted.org/packages/25/33/576d2859134745f7ebe5a114c7a2aa61637f7315fcdc437a9ce712298c38/monero_api_cli-0.2.1.tar.gz",
"platform": null,
"description": "# Monero-api-cli \n![GitHub Release](https://img.shields.io/github/v/release/Dvd-Znf/monero-api-cli?include_prereleases&logo=GitHub&label=Latest%20release%3A&color=lightgreen)\n![PyPI - Version](https://img.shields.io/pypi/v/monero-api-cli?logo=Python&label=Latest%20PyPi%20version%3A&color=lightyellow)\n![AUR Version](https://img.shields.io/aur/version/monero-api-cli?logo=Arch%20Linux&label=Latest%20AUR%20version%3A)\n## Cli for interacting with the MoneroDaemon-RPC API \n![Banner](./imgs/Banner.png) \n`monero-api-cli` is a Python cli application meant for remotely interacting with a Monero Daemon via its [RPC API](https://www.getmonero.org/resources/developer-guides/daemon-rpc.html) \nUnder the hood it mostly uses the [Prompt-Toolkit module](https://python-prompt-toolkit.readthedocs.io/en/master/) for its [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) interface and [Requests](https://requests.readthedocs.io/en/latest/) for the actual interaction with the API\n## Usage:\n```\n$ monero-api-cli --help\nusage: [-h] [-v] [--daemon-address DAEMON_ADDRESS] [--config-file CONFIG_FILE] {help,get_info} ...\n\nCli for interacting with the MoneroDaemon-RPC API\n\noptions:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n --daemon-address DAEMON_ADDRESS\n Which daemon address to use, format: [IPv4 address]:[Port number]\n --config-file CONFIG_FILE\n Path to config file\n\nRPC methods:\n {help,get_info}\n help Help information regarding a command\n get_info Invoke the get_info RPC method\n```\nIf you call the app with no additional arguments it will enter into a REPL cli mode otherwise it will just take the argument as a RPC method.\n### Available RPC Methods/Arguments:\n#### help \n![helpimage](./imgs/Screenshot_Help.png)\n \nIf no additional arguments are passed it will go into REPL mode \nOtherwise it will just take the argument and display the help message associated with it \n#### get_info \nCalls the get_info RPC method \n#### version (REPL only)\nPrint current version \n#### exit (REPL only)\nExit the cli REPL mode \nYou can also use Ctrl+C to exit \n### Available options:\n#### -h, --help\nShow help message and exits \n#### -v, --version \nShow current version and exit \n#### --daemon-address\nWhich daemon address to use, format: [IPv4 address]:[Port number] \n#### --config-file\nPath for a config file \nCheck Config File section for more details \n### Example usage:\n![example](./imgs/Screenshot_Usage.png)\n## Config File:\nDefault location for config file is /etc/monero-api-cli/monero-api-cli.config for MacOS/Linux \nAnd C:\\ProgramData\\MoneroApiCli\\monero-api-cli.confg for Windows \nExample config file located at root of this repo, named `monero-api-config.config`\n``` ini \n# Config File INI/TOML like syntax\n# Lines starting with # are comments and have their respective default options\n[settings]\n# Which daemon address to use, format: [IPv4 address]:[Port number]\ndaemon-address = 127.0.0.1:18081\n```\n## Dependencies:\nBecause the app is bundled using pyinstaller dependencies are _not_ required on the binary versions \nThe dependencies are only required when working direclty with the source \nInstall all python module dependencies with: `pip install -r requirements.txt` \n \n| Name | PyPi Name | What is it used for? |\n| ---- | ------- | -------------------- |\n| Python | N/A | Necessary for interpreting source code |\n| Requests module | `requests` | Used in the implementation of interacting with the API |\n| Prompt Toolkit module | `prompt_toolkit` | Used in the implementation of REPL cli mode |\n \n## How to install\n### From AUR package\nIf you use Arch Linux you know what to do. \nHere is the link to the AUR package: https://aur.archlinux.org/packages/monero-api-cli\n### From PyPi via pip \n`pip install monero-api-cli` \n### From repo:\nYou can either use the source code with the Python interpretor directly \nOr you could use the provided binary available at `dist/monero-api-cli` for MacOS/Linux and `dist/monero-api-cli.exe` for Windows \n### Step 0:\nClone this repo :P \n``` bash\n$ git clone https://github.com/Dvd-Znf/monero-api-cli\n```\n### Step 1 (With binary):\nUse the provided binary \nDependencies are already bundled in, you dont need to install anything! \n``` bash\n$ cd monero-api-cli\n$ ./dist/monero-api-cli # MacOS/Linux \n```\n``` PowerShell\nPS> ./dist/monero-api-cli.exe # Windows \n```\nIf you get permisions error add execute permisions with: `chmod +x <path to binary>` \n### Step 1 (From source, recommended for development): \nMake sure you have all dependencies installed \nThen just use the Python interpretor on the `launcher.py` script \n``` bash\n$ cd monero-api-cli \n$ python launcher.py \n```\nOr you can run the source directly as a module \n``` bash\n$ python -m src.monero_api_cli\n```\n## Why make this from zero when python-monero module already exists? \n1. This is not meant as a replacement for python-monero module! \nInstead, this is an independent cli application for interacting with monerod via its RPC API \ni.e. cli-app & no wallet RPC \n2. This is mostly meant for monero node operators who would like a nice, intuitive and easy way to interact with their daemon \nThis is the reason I made this. \n3. python-monero last update to its source code was more than a year ago, even tho it could use some improvements, at least to its docs. \nThis is activly developed. \nAfter first release you may integrate monero-api-cli into whatever you want but thats not my problem/focus. \n## Can't you ssh into your node then just use monerod? \nSome setups require the daemon to be non-interactive \nAlso that sound super laaaameeeeeee \n## TODO: \n- Implement `get_connections` RPC Method\n- Implement `get_version` RPC Method\n- Implement `/get_height` RPC Method\n- Implement `/get_net_stats` RPC Method \n### TODO for v1.0.0: \n- Implement more of the API :P \n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Dvd-Znf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Cli for interacting with the MoneroDaemon-RPC API",
"version": "0.2.1",
"project_urls": {
"Bug Tracker": "https://github.com/Dvd-Znf/monero-api-cli/issues",
"Homepage": "https://github.com/Dvd-Znf/monero-api-cli"
},
"split_keywords": [
"monero",
" cli-app"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6af54daafeb8edfda341867093f54d3c1c76858dd5d440a3868fdaf6b03aece8",
"md5": "f25743aeb553a4153291489cd13d729b",
"sha256": "f96cb93000ead1cd4fbe510b20f48975ebd9a899557825d0ee3a3483b49a7976"
},
"downloads": -1,
"filename": "monero_api_cli-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f25743aeb553a4153291489cd13d729b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 12476,
"upload_time": "2024-11-23T00:41:16",
"upload_time_iso_8601": "2024-11-23T00:41:16.064701Z",
"url": "https://files.pythonhosted.org/packages/6a/f5/4daafeb8edfda341867093f54d3c1c76858dd5d440a3868fdaf6b03aece8/monero_api_cli-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2533576d2859134745f7ebe5a114c7a2aa61637f7315fcdc437a9ce712298c38",
"md5": "8a6e8cff88a469f938d1cc78a0472040",
"sha256": "65203c90c684d64106b782c4652fe4ed9fbb79ee89cef3571c3735154dd1508f"
},
"downloads": -1,
"filename": "monero_api_cli-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "8a6e8cff88a469f938d1cc78a0472040",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 13116,
"upload_time": "2024-11-23T00:41:17",
"upload_time_iso_8601": "2024-11-23T00:41:17.699463Z",
"url": "https://files.pythonhosted.org/packages/25/33/576d2859134745f7ebe5a114c7a2aa61637f7315fcdc437a9ce712298c38/monero_api_cli-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-23 00:41:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Dvd-Znf",
"github_project": "monero-api-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "prompt-toolkit",
"specs": [
[
"==",
"3.0.39"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.31.0"
]
]
}
],
"lcname": "monero-api-cli"
}