No project description provided
Project description
PyBRY, a Python API Wrapper for lbry & lbrycrd
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
# 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
File details
Details for the file pybry-1.3.9.tar.gz
.
File metadata
- Download URL: pybry-1.3.9.tar.gz
- Upload date:
- Size: 6.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7230b7f4187d7c6d9a6412e5014df03c98ba21cc700907ae07423ce7a2e1ae0c |
|
MD5 | 4c7cf0c4736ee9e51cdf143ef611c459 |
|
BLAKE2b-256 | b20f6df34cadd00ecec29739b08f6212e8d2e81fb71befc66e747d1481bc5d35 |