gitmyhub

lbry-sdk

Python ★ 7.2k updated 1y ago

The LBRY SDK for building decentralized, censorship resistant, monetized digital content apps.

A Python SDK for building apps on LBRY, a decentralized peer-to-peer content network where files are shared across computers and indexed on a blockchain, accessed via a local daemon that exposes a JSON-RPC API.

PythonJSON-RPCBlockchainsetup: hardcomplexity 4/5

The LBRY SDK is a Python library for building apps on top of the LBRY network, a decentralized peer-to-peer system for publishing and accessing digital content. Instead of storing content on a central server that a company controls, LBRY spreads it across many computers, similar to how BitTorrent works for file sharing. A blockchain (a public, tamper-resistant ledger) acts as the global index where content metadata, creator identities, and access rules are recorded and can be searched.

The SDK bundles several components that developers use to interact with this network. A distributed hash table helps peers find each other to exchange content. A blob exchange layer handles transferring encrypted chunks of data between peers and negotiating payments. A wallet component manages LBRY blockchain transactions. A schema layer encodes and decodes the metadata stored on the blockchain.

The most accessible part of the SDK for most developers is a background daemon process that exposes a JSON-RPC API over HTTP. You start it by running lbrynet start, after which it listens on localhost port 5279. Any programming language that can make HTTP requests can call this API to search for content, publish files, download files, manage a wallet, and perform other operations. The full API is documented separately on the LBRY developer site.

Pre-built binaries are available for macOS, Linux, and Windows so you do not have to install Python and build from source to try it. Source installation instructions are in a separate INSTALL.md file in the repository.

The project is MIT licensed. It was the primary reference implementation of the LBRY network protocols and underlies applications built on the LBRY ecosystem.

Where it fits