monero-api-cli


Namemonero-api-cli JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummaryCli for interacting with the MoneroDaemon-RPC API
upload_time2024-01-14 12:51:25
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT 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 No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Monero-api-cli       
## 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 PyPi via pip   
`pip install monero-api-cli`     
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?      
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        
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.      
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 realse 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:    
- ~~Add ability to switch daemon address from REPL interactive mode~~         
  - ~~Create a separate function for IP address validation~~     
### TODO for v1.0.0:       
- Implement more of the API :P     

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "monero-api-cli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "monero,cli-app",
    "author": "",
    "author_email": "Dvd-Znf <email@dvdznf.xyz>",
    "download_url": "https://files.pythonhosted.org/packages/31/e7/e6b42c64faca269f0e6ad067a876bc113ebcacfacc3315eebd33815a2aa2/monero-api-cli-0.2.0.tar.gz",
    "platform": null,
    "description": "# Monero-api-cli       \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 PyPi via pip   \n`pip install monero-api-cli`     \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?      \nThis 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        \nThis 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.      \npython-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 realse 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- ~~Add ability to switch daemon address from REPL interactive mode~~         \n  - ~~Create a separate function for IP address validation~~     \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.0",
    "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": "1239a22007617883326ec68a8b52a147fa2b942882da788ae56fd6cd0211de25",
                "md5": "5965bea8b0c9b755864499e3a85c5c11",
                "sha256": "1811facc2a81c7255f2f319320f7727a1668da27ba3c805466dcf7a97d01178e"
            },
            "downloads": -1,
            "filename": "monero_api_cli-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5965bea8b0c9b755864499e3a85c5c11",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12185,
            "upload_time": "2024-01-14T12:51:23",
            "upload_time_iso_8601": "2024-01-14T12:51:23.592201Z",
            "url": "https://files.pythonhosted.org/packages/12/39/a22007617883326ec68a8b52a147fa2b942882da788ae56fd6cd0211de25/monero_api_cli-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31e7e6b42c64faca269f0e6ad067a876bc113ebcacfacc3315eebd33815a2aa2",
                "md5": "fd9e21745231d37170be1b9343d4f073",
                "sha256": "f99d0236dff6f041f5773f5b46bd78ee72624cec242f336ef1a9166125916199"
            },
            "downloads": -1,
            "filename": "monero-api-cli-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fd9e21745231d37170be1b9343d4f073",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12524,
            "upload_time": "2024-01-14T12:51:25",
            "upload_time_iso_8601": "2024-01-14T12:51:25.334601Z",
            "url": "https://files.pythonhosted.org/packages/31/e7/e6b42c64faca269f0e6ad067a876bc113ebcacfacc3315eebd33815a2aa2/monero-api-cli-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-14 12:51:25",
    "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": [],
    "lcname": "monero-api-cli"
}
        
Elapsed time: 0.16603s