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 details)

Uploaded Source

File details

Details for the file pybry-1.5.0.tar.gz.

File metadata

  • Download URL: pybry-1.5.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.0

File hashes

Hashes for pybry-1.5.0.tar.gz
Algorithm Hash digest
SHA256 48c39181cee15585b414f9beba109b50b2f0b7d5489e5e020708fd592f96b65c
MD5 c4f429fe238b50fac9b3ac425d32f5ab
BLAKE2b-256 5d0e64d875f7f45f2734f9953f69b95d4cea423fc27094f5f81f1b7325c44865

See more details on using hashes here.

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