用于lbryd和lbrycrd网络的绑定python api

pybr的Python项目详细描述


pybry,用于lbry&lbrycrd的python api包装器

License: MITLanguage grade: Python

pybry是lbry daemonlbrycrd daemonpython 3.x的api

(不久将添加python 2支持)

安装

pip

只需运行以下命令

$ pip install pybry

你完了!

手动克隆存储库

您可以克隆此存储库,也可以从pypi的 你想要什么版本的网站。只需下载并

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

# Or obtain a release from PyPI's site.
$ wget <extremely long link generated by PyPI> 

$ tar -xzf pybry-x.x.x.tar.gz PyBRY/

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

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

用法

使用api

  1. 请确保lbry-daemon已启动并正在运行,因为您将无法 没有它做任何事。

  2. 首先,将LbrydApiLbrycrdApipybry导入到项目中。

lbryd

的api

使用生成的代码

api从lbryd文档生成所有函数,并转换 它变成了有形的、文档化的代码。

[1]frompybryimportLbrydApi# Initialize the API[2]lbry=LbrydApi()# Just call the method as documented in the LBRYD API[3]response=lbry.claim_list(name="bellflower")

因为所有的代码都有适当的文档记录,如果您要求在IDE中提供文档记录, 或者如果你自己去读,它会显示如下:

[4]response=lbry.account_balance()ReturnthebalanceofanaccountParams:account_idIfprovidedonlythebalanceforthisaccountwillbegiven(Optional)addressIfprovidedonlythebalanceforthisaddresswillbegiven(Optional)include_unconfirmedIncludeunconfirmed(Optional)Returns:(decimal)amountoflbrycreditsinwallet(decimal)amountoflbrycreditsinwallet

手动调用api

因为所有代码都是向lbry守护进程发出请求,所以您还可以 就像你在命令线上用卷发一样。事实上,这是 实际上,生成代码的主体是做什么的。

# You can also use the traditional method of making requests # if you prefer the cURL commandline syntax, works the same.response=lbry.call("claim_list",{"name":"bellflower"})

lbrycrd

的api
frompybryimportLbrycrdApi# Provide the username and passwordlbrycrd=LbrycrdApi("username","password")# Just specify the method and the parametersresponse=lbrycrd.call("wallet_unlock",{"wallet_username","wallet_password"})

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java我可以在J2EE1.4中使用JAXR吗   YouTube数据API超出了未经验证的java每日使用限制   java RED5 RTMPConnManager未设置applicationContext局部变量。这会导致NullPointerException   java多部分/formdata,加载图像(安卓)   java Struts 2<s:select>填充表单中的其他字段   java Eclipse在迁移后不会将邮件属性传递给Spring Boot   java如何检查请求的TLS版本   java如何从包中导入相同的类   如何在java中将BLOB字符串转换为人类可读的格式字符串   java使用Play映射特定的文件路径!框架   java Eclipse重构   在子字符串上使用“预定义字符类”的java   java如何在SeleniumWebDriver中选择li中的锚定标记?   jspjava。木卫一。FileNotFoundException:系统找不到指定的路径   java Hi,在启动cmd\design javafx\cmd eclipse时,我的文件不是删除的,也不是复制的   java Selenium Web驱动程序异常“找不到:taskkill的可执行文件”   java如何获得数组的迭代器?