> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenderly.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Web3.py - Node RPC Integration

> जानें कि Web3.py का उपयोग कैसे करें ताकि आपका Python एप्लिकेशन Node RPC के माध्यम से Ethereum के साथ संचार कर सके।

[web3.py](https://web3py.readthedocs.io/en/stable/index.html) Ethereum के साथ इंटरैक्ट करने के लिए एक Python लाइब्रेरी है।

यह आमतौर पर विकेंद्रीकृत ऐप्स (dapps) में transactions भेजने, स्मार्ट कॉन्ट्रैक्ट्स के साथ इंटरैक्ट करने, block डेटा पढ़ने, और विभिन्न अन्य उपयोग मामलों में सहायता के लिए पाया जाता है। 80+ EVM नेटवर्क्स तक पहुंचने के लिए web3.py को [Node RPC](/node-rpc/overview) पर पॉइंट करें, और समर्थित मेथड्स के लिए [JSON-RPC reference](/node-rpc/rpc-reference) देखें।

```py showLineNumbers title="connect.py" theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}

from web3 import Web3, AsyncWeb3

w3 = Web3(Web3.HTTPProvider('https:// mainnet.gateway.tenderly.co/<TENDERLY_NODE_ACCESS_KEY_MAINNET>'))
w3Async = AsyncWeb3(AsyncWeb3.AsyncHTTPProvider('https:// mainnet.gateway.tenderly.co/<TENDERLY_NODE_ACCESS_KEY_MAINNET>'))
w3Wss = Web3(Web3.WebsocketProvider('wss:// mainnet.gateway.tenderly.co/<TENDERLY_NODE_ACCESS_KEY_MAINNET>'))

print(w3.eth.get_block('latest'))
print(w3Async.eth.get_block('latest'))
print(w3Wss.is_connected())
print(w3Wss.eth.get_block('latest'))
```
