near-collection-py
Python client for managing collections on the NEAR Protocol blockchain.
Requirements
- Python 3.9+
Installation
pip install near-collection-py
Quick Start
from near_collection_py import NearCollectionPyClient
client = NearCollectionPyClient()
Custom RPC endpoint:
client = NearCollectionPyClient(rpc_url="https://rpc.testnet.near.org", timeout=60)
API Reference
NearCollectionPyClient(rpc_url, timeout)
| Parameter | Default | Description |
|---|---|---|
rpc_url |
mainnet RPC | NEAR RPC endpoint URL |
timeout |
30 |
Request timeout in seconds |
Methods
| Method | Description |
|---|---|
get_account(account_id) |
Fetch account details |
get_block(block_id) |
Retrieve block by ID or hash |
get_transaction(tx_hash, sender_id) |
Look up a transaction |
get_collection(collection_id) |
Get a single collection |
list_collections(account_id) |
List all collections for an account |
get_collection_items(collection_id) |
Retrieve items in a collection |
get_item(collection_id, item_id) |
Fetch a specific item |
send_transaction(signed_tx) |
Broadcast a signed transaction |
send_transaction_async(signed_tx) |
Broadcast without waiting for result |
create_collection(account_id, metadata) |
Create a new collection |
Example
client = NearCollectionPyClient()
account = client.get_account("alice.near") collections = client.list_collections("alice.near") items = client.get_collection_items(collections[0]["id"])
License
MIT
Metadata
Release files for near-collection-py 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| near_collection_py-1.0.0.tar.gz | 3.5 kB | Without provenance | Details for near_collection_py-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| near_collection_py-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for near_collection_py-1.0.0-py3-none-any.whl |
Total release size: 7.3 kB
Release files / near_collection_py-1.0.0.tar.gz
| Download URL | near_collection_py-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aacd1bb804375534744b5587046412ecc7f20277cfafacc690fe7d2ea890a8f
|
|
BLAKE2b-256 checksum How to use checksums |
5e46fb6325ddb4e9e83673208833335ecc5af403cf6153d27ab718059e7d86d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / near_collection_py-1.0.0-py3-none-any.whl
| Download URL | near_collection_py-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0098f259945e08f4703d6a5ba2f41d7061237573f98243d85cafc7c31a8a681c
|
|
BLAKE2b-256 checksum How to use checksums |
d1762dbe4a2d87dc982091be65e29e2b49b2bd0474136345c1cb6fa9a8c14155
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for near-collection-py 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.