Skip to main content

Python application

NOTE: ALTHOUGH THIS PROJECT WORKS, IT IS STILL UNDER HEAVY DEVELOPMENT AND THINGS WILL CHANGE BEFORE v1.0

juungle-python

Python package to access Juungle.net API

Installation

$ python -m pip install juungle

Running from source

$ git clone https://github.com/Juungle/juungle-python.git juungle
$ cd juungle
$ python -m pip -r requirements.txt

User credentials for Juungle.net

Using a config file

Create a file user-config.ini with juungle.net credentials in the same directory of your code:

LOGIN_USERNAME="username@email"
LOGIN_PASSWORD="password"

OR While creaing the object

Inside the code

from juungle.nfts import NFTs

nfts = NFTs('username@email', 'password')

Usage

List all WAIFUs nfts that are being sale for 0.01 BCH or less

from juungle.nft import NFTs

nfts = NFTs()

nfts.available_to_buy = True
nfts.purchased = False
nfts.token_group = 'WAIFU'

nfts.get_nfts()

for nft in nfts.list_nfts:
    if nft.price_bch <= 0.01:
        print(nft.token_name)

List all my NFTs

from juungle.nft import NFTS

nfts = NFTs()
nfts.get_my_nfts()

for nft in nfts.list_nfts:
    print(nft.token_name)

List all my NFTs prices in USD and EUR

To query prices we going to use coingecko api

pip install pycoingecko

from juungle.nft import NFTS
from pycoingecko import CoinGeckoAPI

nfts = NFTs()
nfts.get_my_nfts()

# Query price
cg = CoinGeckoAPI()

bch_price = cg.get_price(ids='bitcoin-cash',
            vs_currencies=['usd', 'eur'])['bitcoin-cash']

msg = "NFT: {} with price {} USD or {} EUR"

for nft in nfts.list_nfts:
    print(msg.format(nft.token_name, bch_price['usd'], bch_price['eur'])

Tokens Group IDs

Because tokens/group name are not unique we have to use the HEX id that can be found at the simpleledger.info.

Juungle-python package provides a list of IDs just to make easier of the most common toekns:

Token Name Token ID
WAIFU a2987562a405648a6c5622ed6c205fca6169faa8afeb96a994b48010bd186a66

Metadata

Release files for juungle 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juungle 0.6.2
File Size Uploaded
juungle-0.6.2.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for juungle 0.6.2
File Interpreter ABI Platform
juungle-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / juungle-0.6.2.tar.gz

Download URL juungle-0.6.2.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7c5287788c3971b102fcbacbcf6abc580c6eaeaacd246d5c65f68e84ceec74e0
BLAKE2b-256 checksum
How to use checksums
df5ec173f999d95b5ed145582cf66985f39a38cfd3c706b23ce8266462724fc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9

Release files / juungle-0.6.2-py3-none-any.whl

Download URL juungle-0.6.2-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f4f57ca65f20af3b981165fc088e2085d9b45cfea194f5652c0d534f9e16ce0
BLAKE2b-256 checksum
How to use checksums
18ad22afab0bef83c45063bb3f8a59783e506e4cd6ab0dc91d87d9ae835a084a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1.1

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page