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

# Getting started

# Python: Getting Started

`notareum` is the official Python SDK for the Notareum Protocol. It supports Python 3.10+ and is built on top of `web3.py` v7 and `eth_account`. This page installs the package, configures a provider and account, and produces a signed `.nota` file.

## Install

```bash theme={"system"}
pip install notareum
# or with Poetry
poetry add notareum
# or with uv
uv pip install notareum
```

`web3` and `eth_account` are pulled in as direct dependencies. Production deployments typically also want `httpx` or `requests` for custom transports.

## Requirements

* Python 3.10 or newer (`|` union types and `match` statements are used internally).
* An Ethereum JSON-RPC endpoint.
* Optional: an `eth_account.Account` instance for write operations.

## Create a Notareum instance

```python theme={"system"}
from notareum import Notareum
from web3 import Web3
from eth_account import Account
import os

w3 = Web3(Web3.HTTPProvider(os.environ["RPC_URL"]))
acct = Account.from_key(os.environ["PRIVATE_KEY"])

ntm = Notareum(
    provider=w3,
    contracts={
        "nota_token": os.environ["NOTA_TOKEN"],
        "ve_nota": os.environ["VE_NOTA"],
        "validator_staking": os.environ["VALIDATOR_STAKING"],
        "nota_registry": os.environ["NOTA_REGISTRY"],
        "verification_engine": os.environ["VERIFICATION_ENGINE"],
        "slashing_manager": os.environ["SLASHING_MANAGER"],
        "fee_manager": os.environ["FEE_MANAGER"],
        "access_manager": os.environ["ACCESS_MANAGER"],
    },
    account=acct,  # optional; only needed for writes
)
```

Contract addresses for the current deployment are listed in [Contract Addresses](../../reference/contract-addresses.md).

## Your first .nota file

`.nota` file creation is purely local. No network calls are made.

```python theme={"system"}
nota = ntm.nota.create(
    type="address",
    chain_name="ethereum",
    chain_id=1,
    identifier=acct.address,
    name="My wallet",
    description="Primary hot wallet",
    issuer_name="Alice",
    issuer_entity_type="individual",
).validate().sign(acct.key.hex())

serialized = nota.serialize()
print(serialized)
```

The resulting string is canonical, deterministic JSON safe to send over any channel: HTTP, email, QR code, or a file on disk. Recipients (in Python, TS, or Rust) will see the same bytes and verify the same signature.

## Read a contract

No account is required for reads:

```python theme={"system"}
info = ntm.registry.get_resource("0x1234...resourceIdHex...")
print(info.owner, info.verification_level, info.is_revoked)
```

## Write a contract

```python theme={"system"}
tx_hash = ntm.registry.register_resource(
    resource_type=0,          # ADDRESS
    chain_id=1,
    identifier=acct.address,
    proof_hash="0x" + "0" * 64,
    alias="alice.eth",
)
print("Registered:", tx_hash)
```

The SDK sends the transaction, waits on the default behavior for the RPC, and returns the hash as a hex string. For advanced transaction management (gas pricing, nonce tracking, batching) use `web3.py` directly with the SDK's exposed contract addresses.

## Sync and async

The Python SDK is synchronous by design: it integrates naturally with FastAPI via threadpool offloading, Celery workers, Django views, and scripts. An explicit async wrapper ships with `notareum.asyncio.Notareum` for projects that prefer `async/await`.

## Next steps

* [Working with .nota files](nota-files.md)
* [Registering a resource on-chain](registry.md)
* [Full API reference](api-reference.md)
