PyPI Package - near-account-py
Project description
near-account-py
Python package for account management on the NEAR Protocol.
Python 3.9+ | pip install near-account-py
Installation
pip install near-account-py
Quick Start
from near_account_py import NearAccountPyClient
client = NearAccountPyClient() # defaults to mainnet RPC
Check if an account exists
exists = client.account_exists("alice.near")
Get account details
account = client.get_account("alice.near")
Get balance
balance = client.get_balance("alice.near")
Usage
client = NearAccountPyClient( rpc_url="https://rpc.mainnet.near.org", # optional timeout=30 # optional )
Available Methods
| Method | Description |
|---|---|
get_account(account_id) |
Fetch account state |
account_exists(account_id) |
Check if account exists |
get_balance(account_id) |
Get account balance |
get_access_keys(account_id) |
List access keys |
send_transaction(signed_tx) |
Submit a signed transaction (sync) |
send_transaction_async(signed_tx) |
Submit a signed transaction (async) |
get_block(block_id) |
Fetch block by ID or "latest" |
get_network_info() |
Retrieve network info |
get_gas_price(block_id) |
Get gas price for a block |
Networks
Testnet
client = NearAccountPyClient(rpc_url="https://rpc.testnet.near.org")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file near_account_py-1.0.0.tar.gz.
File metadata
- Download URL: near_account_py-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7b1cf4b09f9f1dd0fcc189f144bf77d883796d3c85496285a977ff2b2ab13e8
|
|
| MD5 |
e2cb506684fd67088c2d4ab453867292
|
|
| BLAKE2b-256 |
2680883089d4f30a6643864d2139ae23fcd74ff84aac37edda67a6bb5ce09011
|
File details
Details for the file near_account_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: near_account_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d50350c6edf708b1627bc986496860b7b4c1de440b1a36b336bf9ff8240dd8a2
|
|
| MD5 |
11e8945e873485274f0a3516c94feb4b
|
|
| BLAKE2b-256 |
6ac852f209e43ee6a7210c9ba007ba08634a7d9e42696e242869a8b080272ca4
|