Skip to main content

A python wrapper for the Molaris REST API

Project description


Add-a-heading

MoralisSDK

Problem

  1. Data analytics and Data related projects for web3 protocols increasing day by day but lack of sdk//wrapper//easy to use functions available for protocols in python language.

  2. No easy to use tools on python for NFTStorage // web3storage // pinata // MoralisIPFS.

Solution

*MoralisSDK is a DATA DEVELOPER TOOLING

  1. It provide a easy to integrate methods to get the datas very quickly with the help of Moralis.

  2. Simple function's for NFTSTORAGE,WEB3STORAGE,PINATA upload and download options in python.

  3. It provide chainlink analytics data via simple function call with the help of Moralis.

Moralis

Use requires a Molaris API key which is currently available with the free Molaris service tier.

Install

** pip install MoralisSDK==1.0.1

IPFS Setup

from MoralisSDK import ipfs
moralis = ipfs.IPFS()

NFTSTORAGE

1.upload_nft_storage(api_key,file)

2.status_nft_storage(apikey,cid)

3.nft_storage_download_link(cid)

WEB3STORAGE

1.upload_web3_storage(apikey,file)

2.status_web3_storage(apikey,cid)

3.web3_storage_download_link(cid)

PINATA

1.upload_pinata(pinata_api_key,pinata_secret_api_key, file)

2.pinata_download_link(cid)

MORALIS Setup

Replace YOUR_API_KEY with the Moralis API Key.

from MoralisSDK import api
moralis = api.MoralisApi()
moralis.set_api_key("YOUR_API_KEY")

Get_nfts [Account] (Function shows manditory params, play around with optional also).

moralis.get_nfts(address='0x1d62df39f4D20119EcEEf66bFEE23c0afe49CeB8', chain='eth')

Get_transfers [Account].

moralis.get_nfts_transfer(address='0x1d62df39f4D20119EcEEf66bFEE23c0afe49CeB8', chain='eth')

Get_nft_for_contract [Account].

moralis.get_nfts_token(address='0x73E9f114536C6807B6d9388bBf76f5404c621a77', chain='eth', token_address='0x34d85c9cdeb23fa97cb08333b511ac86e1c4e258')

Get_nft_trade [Token].

moralis.get_nfts_trades(address='0x73E9f114536C6807B6d9388bBf76f5404c621a77', chain='eth')

Get_nft_lowest_price [Token].

moralis.get_nft_lowest_price(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', chain='eth')

Get_nft_transfer_from_blocks [Token].

moralis.get_nfts_transfer_blocks(from_block='***')

Get_tokenids [Token].

moralis.get_token_id(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')

Get_nft_owners [Token].

moralis.get_nft_owners(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')

Get_nft_contract_transfer [Token].

moralis.get_contract_nft_transfers(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')

Get_nft_collection_metadata [Token].

moralis.get_nft_metadata(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d')

Check_nft_metadata_sync [Token].

moralis.get_nft_metadata_resync(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', token_id='1000')

Get_nft_token_metadata [Token].

moralis.get_token_id_metadata(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', token_id='1000')

Get_nft_token_owner [Token].

moralis.get_token_id_owners(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', token_id='1000')

Get_nft_transfer [Token].

moralis.get_token_id_transfers(address='0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d', token_id='1000')

Get_native_balance

moralis.get_native_balance(address, chain)

Get_tokens_for_wallet

moralis.get_tokens_for_wallet(address, chain)

Get_token_price

moralis.get_token_price(address, chain)

Native_to_token

moralis.convert_native_amount_to_token_amount(address, chain, native_amount)

Token_to_native

moralis.convert_token_amount_to_native_amount(address, chain, native_amount)

CHAINLINK Setup

from MoralisSDK import chainlink
moralis = chainlink.Chainlink()

Available functions to get Chainlink analytics data

offset -> page , limit -> data points limit, sortby -> [asc, desc]

1.active_feeds(offset,limit)

2.Active_Feeds_Requesters(limit, sortby)

3.Keepers_BSC_Daily(limit, sortby)

4.Keepers_ETH_Daily(limit, sortby)

5.Keepers_POLYGON_Daily(limit, sortby)

6.Oracle_Requests_over_Time(limit, sortby)

7.Total_LINK_on_centralized_exchanges(limit, sortby)

8.chainlink_VRF_v1_daily_BSC(limit, sortby)

9.chainlink_VRF_v1_daily_ETH(limit, sortby)

10.chainlink_VRF_v1_daily_POLYGON(limit, sortby)

11.chainlink_VRF_v2_daily_BSC(limit, sortby)

12.chainlink_VRF_v2_daily_ETH(limit, sortby)

13.chainlink_VRF_v2_daily_POLYGON(limit, sortby)

End Notes

MoralisSdk that capable to help the data analyst or data scientiest who works on web3 analytics.Just make the flow very easy for them to develop the projects.

MoralisSDK still ongoing with the development to add more web3 protocols data's with the help of Moralis.

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

MoralisSDK-1.0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

MoralisSDK-1.0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file MoralisSDK-1.0.2.tar.gz.

File metadata

  • Download URL: MoralisSDK-1.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for MoralisSDK-1.0.2.tar.gz
Algorithm Hash digest
SHA256 fbcdc3c2f630e7a79248d3ae5740a913564a34030cb61744a2214d57da057459
MD5 19597147ef43723799635a804159e1d5
BLAKE2b-256 96e3bfb75f0927d10cf1c80555505e9a0234442ecaf408a6359957a948f16fdd

See more details on using hashes here.

File details

Details for the file MoralisSDK-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: MoralisSDK-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for MoralisSDK-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a38650354dfa423f75d7c5647f1b9142dd1f52cfa718c4cc5db178637536ff9
MD5 e41bd38cae8397efd56666345c36da33
BLAKE2b-256 fea9b06656e8731b64076e5caa21384d0843842dd9a14fa46a9e51374274bf2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page