Skip to main content

No project description provided

Project description

PyBRY, a Python API Wrapper for lbry & lbrycrd

License: MIT Language grade: Python

PyBry is a wrapper for the lbry daemon and lbrycrd daemon API for Python 3.x

(Python 2 support will be added very soon)

Installation

Using pip

$ pip install pybry

Manually Cloning the Repository

# Simply clone the repository somewhere
$ git clone https://github.com/osilkin98/pybry

# Change directories into the newly created repository
$ cd PyBRY/

# Now you simply run the setup.py file:
$ python3 setup.py install

And you're done!

Usage

Import LbryApi or LbrycrdApi from pybry into your project and simply use the call(method, params) to interact with the respective API.

For Normal Lbry:

from pybry import LbryApi

# Initialize the API
lbry = LbryApi()

# Call the method you want as a str
response = lbry.call("claim_list", {"name": "bellflower"})

For Lbrycrd:

from pybry import LbrycrdApi

# Provide the username and password
lbrycrd = LbrycrdApi("username", "password")

# Just specify the method and the parameters
response = lbrycrd.call("wallet_unlock", {"wallet_username", "wallet_password"})

*Note: You have to have the lbry-daemon running in the background to use these, simply execute those and you'll be able to make requests efficiently.

Future: Code Generation

Code generation for lbryd_api is a feature that is ready to be implemented, (in the generator.py file). However the file itself cannot be used to generate working code due to to a couple of flaws in the actual documentation file as documented here.

If you would like to use it so you can have proper function names and parameters for your code, you may do so. Simply run $ python setup.py build_py and then delete all instances of <amount> and <file_name> found in your lbryd_api.py file. Then you're done!

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

pybry-1.5.0.tar.gz (21.0 kB view hashes)

Uploaded Source

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