Skip to main content

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 relays
  • Query events from relays
  • Encode/decode kind4 messages

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

Install Using pip

To install using pip use the command below:

pip install nostpy-cli

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 .

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nostpy_cli-0.1.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

nostpy_cli-0.1.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file nostpy_cli-0.1.3.tar.gz.

File metadata

  • Download URL: nostpy_cli-0.1.3.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

Hashes for nostpy_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5252b8c21ddbac15e6b1635dd13953b666a83e4e4bc095bdbd75e693902fa595
MD5 39650ececbed0ba39d39467c43d09a48
BLAKE2b-256 14add048c8dfced05c013c6f6218c6fa014dcfbfa1ba0b02d4824bcf4ea18b1c

See more details on using hashes here.

File details

Details for the file nostpy_cli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nostpy_cli-0.1.3-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

Hashes for nostpy_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 65bd9f61944ed433f887c28ecac926e56dba8119719992af4e49ec36112fd7bf
MD5 646edd7a14f46c7ffe4696b5dc7eeb52
BLAKE2b-256 c28667bb0e0bd13ce72b412cfa3409d90837378da6c8972a10f728cec15247ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page