moralis


Namemoralis JSON
Version 0.1.46 PyPI version JSON
download
home_pageNone
SummaryThe official Moralis Python SDK
upload_time2024-04-24 11:25:36
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords moralis moralis sdk moralis python sdk web3 crypto ethereum avalanche blockchain contracts eth evm fantom nft dapps binance solana
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    <a align="center" href="https://moralis.io" target="_blank">
      <img src="https://raw.githubusercontent.com/MoralisWeb3/Moralis-Python-SDK/main/assets/moralis-logo.svg" alt="Moralis JS SDK" height=200/>
    </a>
    <h1 align="center">Moralis Python SDK</h1>
    <a href="https://discord.gg/moralis" target="_blank">
      <img alt="Join the Moralis DAO on Discord" src="https://img.shields.io/discord/819584798443569182?color=7289DA&label=Discord&logo=discord&logoColor=ffffff">
    </a>
    <a href="https://docs.moralis.io" target="_blank">
      <img alt="Check the docs" src="https://img.shields.io/badge/Docs-Full Documentation-21BF96?style=flat&logo=gitbook&logoColor=ffffff">
    </a>
    <a href="https://forum.moralis.io" target="_blank">
      <img alt="Discourse posts" src="https://img.shields.io/discourse/posts?color=B7E803&label=Forum&logo=discourse&server=https%3A%2F%2Fforum.moralis.io">
    </a><br/>
    <a href="https://pypi.org/project/moralis/"><img alt="pypi" src="https://img.shields.io/pypi/v/moralis?label=version"></a>
    <img src="https://img.shields.io/github/last-commit/MoralisWeb3/Moralis-Python-SDK">
  <p>
  </p>
  <p>
    A library that gives you access to the powerful Moralis Server backend from your Python app.
  </p>
  <br/>
</div>

**Features**:

- Web3 **authentication**
- Make **Evm api** and **Solana api** calls
- **Stream** realtime blockchain data

... and much more. Check the [official Moralis docs](https://docs.moralis.io/) for more details.

# 🚀 Quick start

If you're new to Moralis, check the [quickstart guide in the official docs](https://docs.moralis.io/docs/quickstart) on how to get started.

If you're already familiar with Moralis and have your account registered. Then follow along to connect your SDK:

## 1. Install Moralis

```shell
pip install moralis
```

## 2. Call your methods

Import the correct module from the SDK and call the method you need. For a full reference of all the methods available, check the [references](#-references) section.

<!-- Start: generated:example-evm_api -->

```python
from moralis import evm_api

api_key = "YOUR_API_KEY"
params = {
    "address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", 
    "chain": "eth", 
    "to_block": 1.2, 
}

result = evm_api.balance.get_native_balance(
    api_key=api_key,
    params=params,
)

print(result)
```

<!-- End: generated:example-evm_api -->

# 🧭 Table of Contents

- [🚀 Quick start](#-quick-start)
  - [1. Install Moralis](#1-install-moralis)
  - [2. Call your methods](#2-call-your-methods)
- [🧭 Table of Contents](#-table-of-contents)
- [⭐️ Star us](#️-star-us)
- [🤝 Need help](#-need-help)
- [👀 Examples](#-examples)
- [📚 References](#-references)
  - [evm_api](#evm_api)
  - [sol_api](#sol_api)
  - [auth](#auth)
  - [streams](#streams)
- [🧙‍♂️ Community](#️-community)

# ⭐️ Star us

If this JS SDK helps you build your dapps faster - please star this project, every star makes us very happy!

# 🤝 Need help

If you need help with setting up the boilerplate or have other questions - don't hesitate to write in our community forum and we will check asap. [Forum link](https://forum.moralis.io). The best thing about this SDK is the super active community ready to help at any time! We help each other.

# 👀 Examples

**_Example getting native balance of an address via the EVM balance API_**

<!-- Start: generated:example-evm_api -->

```python
from moralis import evm_api

api_key = "YOUR_API_KEY"
params = {
    "address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e", 
    "chain": "eth", 
    "to_block": 1.2, 
}

result = evm_api.balance.get_native_balance(
    api_key=api_key,
    params=params,
)

print(result)
```

<!-- End: generated:example-evm_api -->

**_Example getting native balance of an address via the SOL account API_**

<!-- Start: generated:example-sol_api -->

```python
from moralis import sol_api

api_key = "YOUR_API_KEY"
params = {
    "network": "", 
    "address": "", 
}

result = sol_api.account.balance(
    api_key=api_key,
    params=params,
)

print(result)
```

<!-- End: generated:example-sol_api -->

**_Example getting authentication message via the Auth API_**

<!-- Start: generated:example-auth -->

```python
from moralis import auth

api_key = "YOUR_API_KEY"
body = {
    "domain": "defi.finance", 
    "chainId": "1", 
    "address": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B", 
    "statement": "Please confirm", 
    "uri": "https://defi.finance/", 
    "expirationTime": "2020-01-01T00:00:00.000Z", 
    "notBefore": "2020-01-01T00:00:00.000Z", 
    "resources": ['https://docs.moralis.io/'], 
    "timeout": 15, 
}

result = auth.challenge.request_challenge_evm(
    api_key=api_key,
    body=body,
)

print(result)
```

<!-- End: generated:example-auth -->

**_Example getting stream via the Streams API_**

<!-- Start: generated:example-streams -->

```python
from moralis import streams

api_key = "YOUR_API_KEY"
params = {
    "limit": 1.2, 
    "cursor": "", 
}

result = streams.evm_streams.get_streams(
    api_key=api_key,
    params=params,
)

print(result)
```

<!-- End: generated:example-streams -->

# 📚 References

For more info see [the live docs](https://moralisweb3.github.io/Moralis-Python-SDK/), or the [docs pages](./docs)

<!-- Start: generated:references -->

## evm_api

- [balance](./docs/evm_api/balance.md)
- [block](./docs/evm_api/block.md)
- [defi](./docs/evm_api/defi.md)
- [events](./docs/evm_api/events.md)
- [ipfs](./docs/evm_api/ipfs.md)
- [nft](./docs/evm_api/nft.md)
- [resolve](./docs/evm_api/resolve.md)
- [token](./docs/evm_api/token.md)
- [transaction](./docs/evm_api/transaction.md)
- [utils](./docs/evm_api/utils.md)

## sol_api

- [account](./docs/sol_api/account.md)
- [nft](./docs/sol_api/nft.md)
- [token](./docs/sol_api/token.md)

## auth

- [challenge](./docs/auth/challenge.md)

## streams

- [evm_streams](./docs/streams/evm_streams.md)
- [history](./docs/streams/history.md)
- [project](./docs/streams/project.md)
- [stats](./docs/streams/stats.md)



<!-- End: generated:references -->

# 🧙‍♂️ Community

- [Discord](https://discord.gg/moralis)
- [Forum](https://forum.moralis.io)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "moralis",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "Moralis, Moralis SDK, Moralis Python SDK, Web3, Crypto, Ethereum, Avalanche, Blockchain, Contracts, Eth, Evm, Fantom, Nft, Dapps, Binance, Solana",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/1a/da/4d5df46154def0e4db35c8b75abf9f2106689cd3bc9c1063661594196b9e/moralis-0.1.46.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n    <a align=\"center\" href=\"https://moralis.io\" target=\"_blank\">\n      <img src=\"https://raw.githubusercontent.com/MoralisWeb3/Moralis-Python-SDK/main/assets/moralis-logo.svg\" alt=\"Moralis JS SDK\" height=200/>\n    </a>\n    <h1 align=\"center\">Moralis Python SDK</h1>\n    <a href=\"https://discord.gg/moralis\" target=\"_blank\">\n      <img alt=\"Join the Moralis DAO on Discord\" src=\"https://img.shields.io/discord/819584798443569182?color=7289DA&label=Discord&logo=discord&logoColor=ffffff\">\n    </a>\n    <a href=\"https://docs.moralis.io\" target=\"_blank\">\n      <img alt=\"Check the docs\" src=\"https://img.shields.io/badge/Docs-Full Documentation-21BF96?style=flat&logo=gitbook&logoColor=ffffff\">\n    </a>\n    <a href=\"https://forum.moralis.io\" target=\"_blank\">\n      <img alt=\"Discourse posts\" src=\"https://img.shields.io/discourse/posts?color=B7E803&label=Forum&logo=discourse&server=https%3A%2F%2Fforum.moralis.io\">\n    </a><br/>\n    <a href=\"https://pypi.org/project/moralis/\"><img alt=\"pypi\" src=\"https://img.shields.io/pypi/v/moralis?label=version\"></a>\n    <img src=\"https://img.shields.io/github/last-commit/MoralisWeb3/Moralis-Python-SDK\">\n  <p>\n  </p>\n  <p>\n    A library that gives you access to the powerful Moralis Server backend from your Python app.\n  </p>\n  <br/>\n</div>\n\n**Features**:\n\n- Web3 **authentication**\n- Make **Evm api** and **Solana api** calls\n- **Stream** realtime blockchain data\n\n... and much more. Check the [official Moralis docs](https://docs.moralis.io/) for more details.\n\n# \ud83d\ude80 Quick start\n\nIf you're new to Moralis, check the [quickstart guide in the official docs](https://docs.moralis.io/docs/quickstart) on how to get started.\n\nIf you're already familiar with Moralis and have your account registered. Then follow along to connect your SDK:\n\n## 1. Install Moralis\n\n```shell\npip install moralis\n```\n\n## 2. Call your methods\n\nImport the correct module from the SDK and call the method you need. For a full reference of all the methods available, check the [references](#-references) section.\n\n<!-- Start: generated:example-evm_api -->\n\n```python\nfrom moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\nparams = {\n    \"address\": \"0x057Ec652A4F150f7FF94f089A38008f49a0DF88e\", \n    \"chain\": \"eth\", \n    \"to_block\": 1.2, \n}\n\nresult = evm_api.balance.get_native_balance(\n    api_key=api_key,\n    params=params,\n)\n\nprint(result)\n```\n\n<!-- End: generated:example-evm_api -->\n\n# \ud83e\udded Table of Contents\n\n- [\ud83d\ude80 Quick start](#-quick-start)\n  - [1. Install Moralis](#1-install-moralis)\n  - [2. Call your methods](#2-call-your-methods)\n- [\ud83e\udded Table of Contents](#-table-of-contents)\n- [\u2b50\ufe0f Star us](#\ufe0f-star-us)\n- [\ud83e\udd1d Need help](#-need-help)\n- [\ud83d\udc40 Examples](#-examples)\n- [\ud83d\udcda References](#-references)\n  - [evm_api](#evm_api)\n  - [sol_api](#sol_api)\n  - [auth](#auth)\n  - [streams](#streams)\n- [\ud83e\uddd9\u200d\u2642\ufe0f Community](#\ufe0f-community)\n\n# \u2b50\ufe0f Star us\n\nIf this JS SDK helps you build your dapps faster - please star this project, every star makes us very happy!\n\n# \ud83e\udd1d Need help\n\nIf you need help with setting up the boilerplate or have other questions - don't hesitate to write in our community forum and we will check asap. [Forum link](https://forum.moralis.io). The best thing about this SDK is the super active community ready to help at any time! We help each other.\n\n# \ud83d\udc40 Examples\n\n**_Example getting native balance of an address via the EVM balance API_**\n\n<!-- Start: generated:example-evm_api -->\n\n```python\nfrom moralis import evm_api\n\napi_key = \"YOUR_API_KEY\"\nparams = {\n    \"address\": \"0x057Ec652A4F150f7FF94f089A38008f49a0DF88e\", \n    \"chain\": \"eth\", \n    \"to_block\": 1.2, \n}\n\nresult = evm_api.balance.get_native_balance(\n    api_key=api_key,\n    params=params,\n)\n\nprint(result)\n```\n\n<!-- End: generated:example-evm_api -->\n\n**_Example getting native balance of an address via the SOL account API_**\n\n<!-- Start: generated:example-sol_api -->\n\n```python\nfrom moralis import sol_api\n\napi_key = \"YOUR_API_KEY\"\nparams = {\n    \"network\": \"\", \n    \"address\": \"\", \n}\n\nresult = sol_api.account.balance(\n    api_key=api_key,\n    params=params,\n)\n\nprint(result)\n```\n\n<!-- End: generated:example-sol_api -->\n\n**_Example getting authentication message via the Auth API_**\n\n<!-- Start: generated:example-auth -->\n\n```python\nfrom moralis import auth\n\napi_key = \"YOUR_API_KEY\"\nbody = {\n    \"domain\": \"defi.finance\", \n    \"chainId\": \"1\", \n    \"address\": \"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\", \n    \"statement\": \"Please confirm\", \n    \"uri\": \"https://defi.finance/\", \n    \"expirationTime\": \"2020-01-01T00:00:00.000Z\", \n    \"notBefore\": \"2020-01-01T00:00:00.000Z\", \n    \"resources\": ['https://docs.moralis.io/'], \n    \"timeout\": 15, \n}\n\nresult = auth.challenge.request_challenge_evm(\n    api_key=api_key,\n    body=body,\n)\n\nprint(result)\n```\n\n<!-- End: generated:example-auth -->\n\n**_Example getting stream via the Streams API_**\n\n<!-- Start: generated:example-streams -->\n\n```python\nfrom moralis import streams\n\napi_key = \"YOUR_API_KEY\"\nparams = {\n    \"limit\": 1.2, \n    \"cursor\": \"\", \n}\n\nresult = streams.evm_streams.get_streams(\n    api_key=api_key,\n    params=params,\n)\n\nprint(result)\n```\n\n<!-- End: generated:example-streams -->\n\n# \ud83d\udcda References\n\nFor more info see [the live docs](https://moralisweb3.github.io/Moralis-Python-SDK/), or the [docs pages](./docs)\n\n<!-- Start: generated:references -->\n\n## evm_api\n\n- [balance](./docs/evm_api/balance.md)\n- [block](./docs/evm_api/block.md)\n- [defi](./docs/evm_api/defi.md)\n- [events](./docs/evm_api/events.md)\n- [ipfs](./docs/evm_api/ipfs.md)\n- [nft](./docs/evm_api/nft.md)\n- [resolve](./docs/evm_api/resolve.md)\n- [token](./docs/evm_api/token.md)\n- [transaction](./docs/evm_api/transaction.md)\n- [utils](./docs/evm_api/utils.md)\n\n## sol_api\n\n- [account](./docs/sol_api/account.md)\n- [nft](./docs/sol_api/nft.md)\n- [token](./docs/sol_api/token.md)\n\n## auth\n\n- [challenge](./docs/auth/challenge.md)\n\n## streams\n\n- [evm_streams](./docs/streams/evm_streams.md)\n- [history](./docs/streams/history.md)\n- [project](./docs/streams/project.md)\n- [stats](./docs/streams/stats.md)\n\n\n\n<!-- End: generated:references -->\n\n# \ud83e\uddd9\u200d\u2642\ufe0f Community\n\n- [Discord](https://discord.gg/moralis)\n- [Forum](https://forum.moralis.io)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The official Moralis Python SDK",
    "version": "0.1.46",
    "project_urls": null,
    "split_keywords": [
        "moralis",
        " moralis sdk",
        " moralis python sdk",
        " web3",
        " crypto",
        " ethereum",
        " avalanche",
        " blockchain",
        " contracts",
        " eth",
        " evm",
        " fantom",
        " nft",
        " dapps",
        " binance",
        " solana"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25d6777c4cc7a47c8d1289d959c7da9730a2b62611cf493afa554ab856c70dd1",
                "md5": "588956396bea763ffbdd900c51807fd0",
                "sha256": "103b9788b1a4f99c0d374383a47ee87795052340af19009803d79a5a4034c9b7"
            },
            "downloads": -1,
            "filename": "moralis-0.1.46-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "588956396bea763ffbdd900c51807fd0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2076607,
            "upload_time": "2024-04-24T11:25:34",
            "upload_time_iso_8601": "2024-04-24T11:25:34.916524Z",
            "url": "https://files.pythonhosted.org/packages/25/d6/777c4cc7a47c8d1289d959c7da9730a2b62611cf493afa554ab856c70dd1/moralis-0.1.46-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ada4d5df46154def0e4db35c8b75abf9f2106689cd3bc9c1063661594196b9e",
                "md5": "e73620da918e44892b5e4331ee884aab",
                "sha256": "6d200686b23f85aaade9119fc5a9f3940e1abf9369e3361f91b05732c507959b"
            },
            "downloads": -1,
            "filename": "moralis-0.1.46.tar.gz",
            "has_sig": false,
            "md5_digest": "e73620da918e44892b5e4331ee884aab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 533299,
            "upload_time": "2024-04-24T11:25:36",
            "upload_time_iso_8601": "2024-04-24T11:25:36.635463Z",
            "url": "https://files.pythonhosted.org/packages/1a/da/4d5df46154def0e4db35c8b75abf9f2106689cd3bc9c1063661594196b9e/moralis-0.1.46.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 11:25:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "moralis"
}
        
Elapsed time: 0.27403s