CLI tool for handling nostpy events
Project description
nostpy-cli
nostpy-cli
is a Command Line Interface (CLI) tool designed to handle nostpy events efficiently. This tool provides easy-to-use commands to send and query events via a WebSocket connection.
Features
- Send events to a specified relay.
- Query events from a relay.
Prerequisites
Before installing nostpy-cli
, ensure you have Python 3.6 or higher installed on your system. You can check your Python version by running:
python3 --version
Installation
Build from source
Clone the Repository First, clone the repository to your local machine:
git clone https://github.com/UTXOnly/nostpy-cli.git
cd nostpy-cli
python3 -m build
pip install .
Install Using pip
To install using pip
use the command below:
pip install nostpy-cli
Usage
Once installed, you can run nostpy-cli from the command line. Below are some examples of how to use the CLI tool:
Send Event
To send an event, you would use a command similar to the following:
nostpy-cli send_event --pubkey "your_public_key" --privkey "your_private_key" --content "your plaintext message" --tags "[['tag1', 'value1']]" --kind 4 --relay "wss://yourrelayurl.com"
--pubkey
, --priv_key
and --relay
arguments are required, all else are optional
Query Event
To query events, use the following command:
nostpy-cli query --kinds "[1,9075]" --relay "wss://yourrelayurl.com"
--relay
field required
Help
To view all available commands and their options, use the help command:
nostpy-cli -h
Contributing
Contributions to nostpy-cli are welcome! Please feel free to submit pull requests or open issues to report bugs or suggest enhancements.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nostpy_cli-0.1.2.tar.gz
.
File metadata
- Download URL: nostpy_cli-0.1.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/6.8.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3acac7be733f85b5b6a46e626d35a6af435c3b2523bac4935e8d7e1e56b7b98 |
|
MD5 | e0a3450559f1a020cc05ec47cc9f0703 |
|
BLAKE2b-256 | c9455329fd9148daa3b2866b756df3f95f3ceb1d7e39258e96f0f403fe3a44a9 |
File details
Details for the file nostpy_cli-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: nostpy_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/6.8.0 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaaff9f4ffd489a4e39d0334b3954d3b769dd0f22823e5c9d96acc2b7a6dce96 |
|
MD5 | 0177d8648fff83113f11e4a799996770 |
|
BLAKE2b-256 | 841f542790bede2e3d5d8f8b40efeff261760fb51d54a80be35a1906fcc34cff |