moralis


Namemoralis JSON
Version 0.1.49 PyPI version JSON
download
home_pageNone
SummaryThe official Moralis Python SDK
upload_time2024-08-12 12:34: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/d9/cf/e122fb3a39755a7640b10cdfe3e4205c05f1ec2a71a9c101535db38ddd44/moralis-0.1.49.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.49",
    "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": "e0650e4df06f0840a00af5661fa09e3438eeaaeba3027ce9381528fe77560613",
                "md5": "35b6254f9ebc273470f019b6b7d7ca3d",
                "sha256": "2a92e26f61d57e726f947541fa30950a48ba45bc0e3fb8e489ff5d7adbc64a7c"
            },
            "downloads": -1,
            "filename": "moralis-0.1.49-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35b6254f9ebc273470f019b6b7d7ca3d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2251845,
            "upload_time": "2024-08-12T12:34:34",
            "upload_time_iso_8601": "2024-08-12T12:34:34.597859Z",
            "url": "https://files.pythonhosted.org/packages/e0/65/0e4df06f0840a00af5661fa09e3438eeaaeba3027ce9381528fe77560613/moralis-0.1.49-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9cfe122fb3a39755a7640b10cdfe3e4205c05f1ec2a71a9c101535db38ddd44",
                "md5": "708d8a4c7f3d8c61e560239ffe0b5ae2",
                "sha256": "ea73e08344e75be980a8ee61f0c16c6d5262e9c34934520cb7b3725dfd838040"
            },
            "downloads": -1,
            "filename": "moralis-0.1.49.tar.gz",
            "has_sig": false,
            "md5_digest": "708d8a4c7f3d8c61e560239ffe0b5ae2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 579209,
            "upload_time": "2024-08-12T12:34:36",
            "upload_time_iso_8601": "2024-08-12T12:34:36.551839Z",
            "url": "https://files.pythonhosted.org/packages/d9/cf/e122fb3a39755a7640b10cdfe3e4205c05f1ec2a71a9c101535db38ddd44/moralis-0.1.49.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-12 12:34:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "moralis"
}
        
Elapsed time: 0.57062s