Metadata-Version: 2.1
Name: nostr-relay
Version: 1.13
Summary: nostr relay
Home-page: https://code.pobblelabs.org/fossil/nostr_relay
Author: Dave St.Germain
Author-email: dave@st.germa.in
License: BSD 3-Clause License
Keywords: protocol
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: falcon
Requires-Dist: aionostr >=0.19.0
Requires-Dist: sqlalchemy[asyncio] >=2.0
Requires-Dist: aiosqlite >=0.18.0
Requires-Dist: aiohttp[speedups]
Requires-Dist: uvicorn[standard]
Requires-Dist: gunicorn
Requires-Dist: setproctitle
Requires-Dist: alembic
Requires-Dist: pydantic >2.0
Requires-Dist: wsproto ; platform_python_implementation != "CPython"
Requires-Dist: python-rapidjson ; platform_python_implementation == "CPython"
Requires-Dist: async-timeout ; python_version < "3.11.0"
Provides-Extra: lmdb
Requires-Dist: lmdb ; extra == 'lmdb'
Requires-Dist: msgpack ; extra == 'lmdb'
Requires-Dist: whoosh ; extra == 'lmdb'
Provides-Extra: postgres
Requires-Dist: asyncpg ; extra == 'postgres'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: pytest-asyncio ; extra == 'test'
Requires-Dist: pytest-xdist ; extra == 'test'

This is a Python 3.9+ implementation of a [nostr](https://github.com/nostr-protocol/nostr) relay.

## Features

* Stores data in LMDB, SQLite or Postgresql. See [Storage](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/storage.md)
* [Scalable](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/performance.md) to thousands of concurrent clients
* [Dynamic allow/deny lists](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/dynamic_lists.md)
* Configurable garbage collector
* Configurable [event validators](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/storage.md)
* [Full-text indexing](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/fulltext.md)
* Can serve as a NIP-05 [identity provider](https://code.pobblelabs.org/fossil/nostr_relay/wiki?name=idp)
* Support for NIP-42 [authentication](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/authentication.md)
* Support for [rate-limiting](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/rate_limits.md)
* Supports more NIPs than any other relay implementation:
    * [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md) – basic protocol
    * [NIP-02](https://github.com/nostr-protocol/nips/blob/master/02.md) – contact lists
    * [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) – verifying identity
    * [NIP-09](https://github.com/nostr-protocol/nips/blob/master/09.md) – deletion events
    * [NIP-11](https://github.com/nostr-protocol/nips/blob/master/11.md) – relay metadata
    * [NIP-12](https://github.com/nostr-protocol/nips/blob/master/12.md) – generic tags
    * [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) – EOSE
    * [NIP-20](https://github.com/nostr-protocol/nips/blob/master/20.md) – command results
    * [NIP-26](https://github.com/nostr-protocol/nips/blob/master/26.md) – delegated events
    * [NIP-33](https://github.com/nostr-protocol/nips/blob/master/33.md) – parameterized replaceable events
    * [NIP-40](https://github.com/nostr-protocol/nips/blob/master/40.md) – expiration events
    * [NIP-42](https://github.com/nostr-protocol/nips/blob/master/42.md) – [authentication](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/authentication.md)
    * [NIP-50](https://github.com/nostr-protocol/nips/blob/master/50.md) – [full-text search](https://code.pobblelabs.org/fossil/nostr_relay/doc/tip/docs/fulltext.md)
    * [NIP-65](https://github.com/nostr-protocol/nips/blob/master/65.md) – Relay lists
* Pluggable features, allowing you to use nostr_relay as a library for your own custom implementation


## Installation

`pip install nostr-relay`

To run:

`nostr-relay serve`

to change the location of the database and other settings, create a yaml config file that looks [like this](https://code.pobblelabs.org/fossil/nostr_relay/file?name=nostr_relay/config.yaml):

and run with `nostr-relay -c /path/to/config.yaml serve`


Then add `ws://127.0.0.1:6969` to your relay list.

(obviously, in production you should use a TLS certificate)

Visit [the nostr-relay fossil repository](https://code.pobblelabs.org/fossil/nostr_relay) for more information.

