Skip to main content

Nektar, a Python package to access Hive API.

Project description

nektar

nektar allows communication to the Hive blockchain using the Hive API.

Official Release

nektar can now be used on your Python projects through PyPi by running pip command on a Python-ready environment.

pip install hive-nektar --upgrade

Current version is 0.9.*, but more updates are coming soon.

This is compatible with Python 3.9 or later.

WARNINGS:

  • This package is still under development, some future breakage is inevatable.
  • Some AppBase API methods are still under development and subject to change.
  • Do NOT copy your private keys in your codes!

Features

1. Lightweight package for small Hive dApps or projects.
2. Readily available methods using the nektar.Waggle() class.
3. Highly costumizable via appbase module.

Nektar Module

Basic Usage

from nektar import Waggle

username = ""
hive = Waggle(username)
hive.append_wif("5*")

communities = hive.communities(limit=1000, sort="subs")
for community in communities:
    print(community["name"] + "\t" + community["title"])


communities = {}
sorting = ["new", "rank", "subs"]
for sort in sorting:
    for community in hive.communities(limit=1000, sort=sort):
        communities.update({community["name"]: community})

subscribers = {}
community = list(communities.keys())[0]
for subscriber in hive.subscribers(community, limit=1000):
    subscribers.update({subscriber[0]: subscriber})
    print(subscriber[0])

accounts = hive.accounts(start="h", limit=1000)

community = community = list(communities.keys())[5]
posts = hive.posts(community, limit=100, sort="created")
print(posts[0])

tag = "nature"
posts = hive.posts(tag, limit=10, sort="created")
for post in posts:
    print(post["title"])

author = ""
permlink = ""
weight = 10000

hive.vote(author, permlink, weight, synchronous=True, strict=False)

AppBase Module

Basic Usage

from appbase import AppBase

hive = AppBase(username)
hive.append_wif("5*")

props = hive.api("database").get_dynamic_global_properties({})

username = "nektar"
account = hive.api("condenser").get_accounts([[self.username]])

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

hive-nektar-0.9.9.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

hive_nektar-0.9.9-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file hive-nektar-0.9.9.tar.gz.

File metadata

  • Download URL: hive-nektar-0.9.9.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for hive-nektar-0.9.9.tar.gz
Algorithm Hash digest
SHA256 5179d8868adffa08179c6a04182fe834ec2998c06f2ec306cabe594df3d2656d
MD5 7f26fe3347279a07c5c6dc273839505d
BLAKE2b-256 a6dbccfab9e33ba2d9d5c6c464f162cab5adf63da5842ec6336ec6658a89d828

See more details on using hashes here.

File details

Details for the file hive_nektar-0.9.9-py3-none-any.whl.

File metadata

  • Download URL: hive_nektar-0.9.9-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for hive_nektar-0.9.9-py3-none-any.whl
Algorithm Hash digest
SHA256 82a63a1fec038cd4d5cd66c33c8b0ad5e0cfce07e494172ae92b521afb2a2bab
MD5 6ac38b3d1f2b29a37c328e3cbc4d6e2d
BLAKE2b-256 7458b4a5832cfa3d294f224719b46a059d6e57934d2b054b02ef7bf78371805a

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