GithubHelp home page GithubHelp logo

milkyklim / bananopy Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 5.0 281 KB

๐ŸŒ๐Ÿฅง: Python library for interaction with Banano

License: MIT License

Python 100.00%
banano crypto cryptocurrency python

bananopy's People

Contributors

artombado avatar kirby1997 avatar milkyklim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bananopy's Issues

BANANO_NODE_PORT causing 404 errors

sending a POST request to the kalium api with a port returns a 404 error. there seems to be no problem when i test it myself using the url without a port

Add tests for functions

Find best way to structure fixtures for functions below:

  • active_difficulty
  • block_count
  • block_count_type
  • block_hash
  • bootstrap_status
  • confirmation_active
  • confirmation_history
  • confirmation_info
  • confirmation_quorum
  • frontier_count
  • key_create
  • peers
  • process
  • representatives
  • representatives_online
  • republish
  • sign_key
  • sign_wallet
  • stats
  • uptime
  • work_validate

Fix ban conversion

Floating point arithmetic brings rounding errors. Enforce input to be str or Decimal.

bananopy.banano.NodeException: {'error': 'Internal server error. Could not reach node.'}

It's not a problem with my code.. Double checked using the example and this is what I got:

>>> import bananopy.banano as ban
Using https://api-beta.banano.cc as API provider on port 443
>>> ban.account_balance("ban_1bananobh5rat99qfgt1ptpieie5swmoth87thi74qgbfrij7dcgjiij94xr")
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    ban.account_balance("ban_1bananobh5rat99qfgt1ptpieie5swmoth87thi74qgbfrij7dcgjiij94xr")
  File "C:\Users\mateo\AppData\Roaming\Python\Python39\site-packages\bananopy\banano.py", line 27, in account_balance
    r = call("account_balance", payload)
  File "C:\Users\mateo\AppData\Roaming\Python\Python39\site-packages\bananopy\banano.py", line 20, in call
    raise NodeException(json_response)
bananopy.banano.NodeException: {'error': 'Internal server error. Could not reach node.'}
>>> 

What's going on?

Fix response type

Everything is str at the moment; this should be changed to int and other relevant types.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.