Official Python SDK for NEXUM Protocol on Solana
Project description
nexum-sdk (Python)
Official Python SDK for NEXUM Protocol — a decentralized freelance marketplace built on Solana.
Installation
pip install nexum-sdk
Requirements
- Python 3.10+
- Dependencies:
httpx,base58,solders
Quick Start
from nexum_sdk import NexumClient, Network
# Connect to devnet
client = NexumClient.devnet()
# Connect to mainnet
client = NexumClient.mainnet()
# Custom RPC
client = NexumClient(network=Network.DEVNET, rpc_url="https://your-custom-rpc.com")
Tasks (async)
import asyncio
from nexum_sdk import NexumClient, TaskStatus
client = NexumClient.devnet()
async def main():
# Fetch all open tasks
tasks = await client.get_open_tasks()
for task in tasks:
print(task.title, task.reward_sol, "SOL")
print(task.skills_list) # ['Rust', 'Solana']
# Fetch a specific task
task = await client.get_task(1)
if task:
print(task.title)
print(task.status) # TaskStatus.OPEN
# Fetch all tasks
all_tasks = await client.get_all_tasks()
# Total value locked
tvl = await client.get_tvl()
print(f"TVL: {tvl:.2f} SOL")
asyncio.run(main())
Tasks (sync helpers)
client = NexumClient.devnet()
# Synchronous wrappers — no async/await needed
tasks = client.get_all_tasks_sync()
tvl = client.get_tvl_sync()
Utilities
from nexum_sdk import (
sol_to_lamports,
lamports_to_sol,
get_sbt_level,
get_sbt_label,
days_left,
short_address,
)
sol_to_lamports(1.5) # 1500000000
lamports_to_sol(1_000_000_000) # 1.0
get_sbt_level(20) # 3
get_sbt_label(3) # "Expert"
days_left(deadline_unix) # 7
short_address("7yn8tuqH...NNzA") # "7yn8...NNzA"
Constants
from nexum_sdk import (
NEXUM_PROGRAM_ID,
NEXUM_DEVNET_RPC,
PLATFORM_FEE_BPS,
SBT_LEVELS,
)
Types
from nexum_sdk import NexumTask, NexumProfile, NexumDispute, TaskStatus, Network, TaskFilter
# Filter tasks
filter_ = TaskFilter(status=TaskStatus.IN_PROGRESS)
tasks = await client.get_all_tasks(filter_)
Links
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
nexum_sdk-0.1.9.tar.gz
(4.5 kB
view details)
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 nexum_sdk-0.1.9.tar.gz.
File metadata
- Download URL: nexum_sdk-0.1.9.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
898e0276e349e9c8c0544a1186501a84e80bf400d086cd61e8319ec72817969c
|
|
| MD5 |
219e63c5f4dc06d6837f44a6aa010b74
|
|
| BLAKE2b-256 |
7c7e40576fc3cd3bbe7e302b69b0f950f40ee88efb74d7f3d1d4bfc66acb35f4
|
File details
Details for the file nexum_sdk-0.1.9-py3-none-any.whl.
File metadata
- Download URL: nexum_sdk-0.1.9-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04f2966027bd3535821f8d5853110ca2c1bf9f7b28be0e7a9c403cf76090e642
|
|
| MD5 |
2a340599c99825a0cf82fc2957049ccb
|
|
| BLAKE2b-256 |
73bfac6c9725404d4e4822dee2dcaccc14a3dae052d65e85ddb84b314b595508
|