Skip to main content

An asynchronous binded Python3.7+ API for the LBRYD and LBRYCRD network

Project description

aioLBRY, a Python API Wrapper for lbry & lbrycrd

License: MIT Code style: black

aioLBRY is a wrapper for the lbry daemon and lbrycrd daemon API for Python 3.7+

(Python 2 will never be supported)

Installation

With pip

Simply run the following

$ pip install aiolbry

And you're done!

Manually Cloning the Repository

You can either clone this repository or get a tarball from PyPI's website for whatever version you want. Simply download it and

# Simply clone the repository somewhere
$ git clone https://gitlab.com/jamieoglindsey0/aiolbry

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

$ tar -xzf aiolbry-x.x.x.tar.gz aiolbry/

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

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

Usage

Using the API

  1. Make sure that lbry-daemon is up and running, as you will not be able to do anything without it.

  2. First, import LbrydApi or LbrycrdApi from aiolbry into your project.

API for LBRYD

Using the Generated Code

The API generates all the functions from the lbryd documentation, and translates it into tangible, documented code.

[1] import asyncio
[2] from aiolbry import LbrydApi

# Initialize the API
[3] lbry = LbrydApi()

[4] loop = asyncio.get_event_loop()

# Just call the method as documented in the LBRYD API
[5] loop.run_until_complete(lbry.claim_list(name="@lbry"))

Calling the API Manually

Since all the code does is make requests to the lbry daemon, you can also use it as you would with cURL on the commandline. In fact, this is actually what the bodies of generated code do.

# 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"})

API For LbryCRD

from aiolbry 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"})

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

aiolbry-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

aiolbry-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file aiolbry-0.1.0.tar.gz.

File metadata

  • Download URL: aiolbry-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for aiolbry-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5180712be14cb63a40e0fd5d0065a29b7d6aac67b0f675fe3d4ac521dcc4c3f3
MD5 0da4a38a8247a1b400ebbffeca9d4c88
BLAKE2b-256 96dbb6b3e7d4dd633cc0bfa13a7c010d2efceba904f9f2dc8180c8aba5e79200

See more details on using hashes here.

File details

Details for the file aiolbry-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aiolbry-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for aiolbry-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb64a4ba8dda0503e37be0eca6d543020354f5944bad97b6c32fc4663585abb
MD5 82f0c5964b6c13aba07afbe5055e3094
BLAKE2b-256 050995a1bc286cb6743b140d72ac595299d17f1815f93c497114e9ca2c7bc7ca

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