Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnny423/pyrelay
PyRelay is a python implementation of a NOSTR Relay, using asyncio
https://github.com/johnny423/pyrelay
asyncio nostr python relay websockets
Last synced: 24 days ago
JSON representation
PyRelay is a python implementation of a NOSTR Relay, using asyncio
- Host: GitHub
- URL: https://github.com/johnny423/pyrelay
- Owner: johnny423
- License: apache-2.0
- Created: 2023-01-06T07:11:42.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-08T17:52:11.000Z (over 1 year ago)
- Last Synced: 2024-08-04T11:01:15.505Z (4 months ago)
- Topics: asyncio, nostr, python, relay, websockets
- Language: Python
- Homepage:
- Size: 112 KB
- Stars: 42
- Watchers: 2
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-nostr - PyRelay - a python implementation of a Nostr relay, using asyncio. (Relays / Implementations)
README
# What is PyRelay?
PyRelay is a python implementation of a NOSTR Relay, using asyncio.
Don't know whats NOSTR is? check it out [here](https://nostr.com/).# Quick start
### Installing
PyRelay require python 3.11.
I suggest setting up virtual env before running locally.Install using git
```bash
git clone https://github.com/johnny423/pyrelay
cd pyrelay
```### Run with docker compose
```bash
docker compose up
```### Install Locally
Install dependencies, without dev dependencies
```bash
pip install -r requirements.txt
```If you have trouble with installing `secp256k1` try executing
On fedora `python-devel` should be installed
```bash
# dnf install python-devel
``````bash
pip install wheel
```
then
```bash
python setup.py bdist_wheel
```
and rerun
```bash
pip install -r requirements.txt
```### Run the server locally
```bash
python ./pyrelay/relay/server.py
```# Developer Setup
Download and install the latest version of git.
Configure git with your username and email.
```bash
git config --global user.name 'your name'
git config --global user.email 'your email'
```Make sure you have a GitHub account.
Clone the repository locally.
```bash
git clone https://github.com/johnny423/pyrelay
cd pyrelay
```Install dependencies, include dev dependencies
```bash
pip install -r requirements.txt -r requirements-dev.txt -r requirements-test.txt
```Install pre-commit
```bash
pre-commit install
```Then, before committing, make sure `Run git hooks` is checked.
### Running tests
You can run the tests with the scripts
```bash
./scripts/test.sh
```# Support status
[Check the NIPs in here](https://github.com/nostr-protocol/nips)
## Supported NIPs
| supported | NIP | description |
|-----------|--------|--------------------------------------------------------------|
| V | NIP-01 | Basic protocol flow description |
| V | NIP-02 | Contact List and Petnames |
| X | NIP-03 | OpenTimestamps Attestations for Events |
| V | NIP-04 | Encrypted Direct Message |
| V | NIP-05 | Mapping Nostr keys to DNS-based internet identifiers |
| V | NIP-06 | Basic key derivation from mnemonic seed phrase |
| V | NIP-07 | window.nostr capability for web browsers |
| X | NIP-08 | Handling Mentions |
| V | NIP-09 | Event Deletion |
| X | NIP-10 | Conventions for clients' use of e and p tags in text events. |
| X | NIP-11 | Relay Information Document |
| V | NIP-12 | Generic Tag Queries |
| X | NIP-13 | Proof of Work |
| X | NIP-14 | Subject tag in text events. |
| V | NIP-15 | End of Stored Events Notice |
| X | NIP-16 | Event Treatment |
| X | NIP-18 | Reposts |
| X | NIP-19 | bech32-encoded entities |
| V | NIP-20 | Command Results |
| X | NIP-22 | Event created_at Limits |
| X | NIP-25 | Reactions |
| X | NIP-26 | Delegated Event Signing |
| X | NIP-28 | Public Chat |
| X | NIP-33 | Parameterized Replaceable Events |
| X | NIP-36 | Sensitive Content |
| X | NIP-40 | Expiration Timestamp |