Skip to main content

Rust implementation of Nostr protocol.

Project description

Nostr - Python Package

Description

Python bindings of nostr library.

If you're writing a typical Nostr client or bot, you may be interested in nostr-sdk.

Getting started

pip install nostr-protocol
from nostr_protocol import Keys, EventBuilder

keys = Keys.generate()
print(keys.secret_key().to_bech32())
print(keys.public_key().to_bech32())

print("Mining a POW text note...")
event = EventBuilder.text_note("Hello from Rust Nostr Python bindings!", []).to_pow_event(keys, 20)
print(event.as_json())

More examples can be found in the examples/ directory.

Supported NIPs

Look at https://github.com/rust-nostr/nostr/tree/master/crates/nostr#supported-nips

State

This library is in an ALPHA state, things that are implemented generally work but the API will change in breaking ways.

Donations

rust-nostr is free and open-source. This means we do not earn any revenue by selling it. Instead, we rely on your financial support. If you actively use any of the rust-nostr libs/software/services, then please donate.

License

This project is distributed under the MIT software 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nostr_protocol-0.11.0-cp312-cp312-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

nostr_protocol-0.11.0-cp312-cp312-manylinux_2_31_aarch64.whl (4.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.31+ ARM64

nostr_protocol-0.11.0-cp312-cp312-manylinux_2_17_x86_64.whl (3.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

nostr_protocol-0.11.0-cp312-cp312-macosx_11_0_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ x86-64

nostr_protocol-0.11.0-cp312-cp312-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

nostr_protocol-0.11.0-cp311-cp311-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

nostr_protocol-0.11.0-cp311-cp311-manylinux_2_31_aarch64.whl (4.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.31+ ARM64

nostr_protocol-0.11.0-cp311-cp311-manylinux_2_17_x86_64.whl (3.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

nostr_protocol-0.11.0-cp311-cp311-macosx_11_0_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ x86-64

nostr_protocol-0.11.0-cp311-cp311-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

nostr_protocol-0.11.0-cp310-cp310-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

nostr_protocol-0.11.0-cp310-cp310-manylinux_2_31_aarch64.whl (4.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.31+ ARM64

nostr_protocol-0.11.0-cp310-cp310-manylinux_2_17_x86_64.whl (3.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

nostr_protocol-0.11.0-cp310-cp310-macosx_11_0_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ x86-64

nostr_protocol-0.11.0-cp310-cp310-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

nostr_protocol-0.11.0-cp39-cp39-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

nostr_protocol-0.11.0-cp39-cp39-manylinux_2_31_aarch64.whl (4.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.31+ ARM64

nostr_protocol-0.11.0-cp39-cp39-manylinux_2_17_x86_64.whl (3.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

nostr_protocol-0.11.0-cp39-cp39-macosx_11_0_x86_64.whl (3.4 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ x86-64

nostr_protocol-0.11.0-cp39-cp39-macosx_11_0_arm64.whl (3.3 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

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