Skip to main content

CommuneX

License: MIT Discord Chat PyPI version

Why CommuneX

CommuneX serves as an alternative library/SDK to the original Commune Ai codebase, offering a streamlined and user-friendly experience. It is designed for simplicity and scalable development. To learn more visit docs

Installation with pip

Requirements: Python 3.10+

Install the communex Python package directly with pip:

pip install communex

Or add it to your Poetry project with:

poetry add communex

Installation with Nix

To install communex the communex cli with Nix

nix profile install .

Features

  • Commands
    • Key management
    • Transfering and staking tokens
    • Module management
    • Client to interact with served modules
    • Module class and server
    • Governance participation

Planned

  • Module API extraction and documentation generator

CLI Usage

The CLI commands are structured as follows:

comx [OPTIONS] COMMAND [ARGS]

There are six top-level subcommands:

  • balance: transfer, stake, unstake and showing balance operations
  • key: creating, saving (AKA regenerating), listing and showing balance operations
  • module: info, list, register, serve, update
  • network: block, parameters, proposals / proposing, voting operations
  • subnet: info, list, update
  • misc: apr, circulating supply
comx subcommand [OPTIONS] COMMAND [ARGS]...

Examples

Retrieving Balance

# Show staked, free and total balance.
comx balance show 5FgfC2DY4yreEWEughz46RZYQ8oBhHVqD9fVq6gV89E6z4Ea 

Creating a Key

comx key create key_name

Retrieving Key Info

comx key show key_name

# Add the `--show-private` flag to show sentitive fields like private key.
comx key show key_name --show-private

Listing Keys

# Lists the names and addresses of keys stored on disk.
comx key list 

List Keys With Balances

# Lists keys stored on disk with their balance (free, staked and total).
comx key balances

Retrieving Module Information

# Note that the module has to be registered on the network.
comx module info vali::calc [--balance] 

Retrieving Global Parameters

comx network params

Retrieving Subnet Parameters

comx subnet list

Retrieving Circulating Supply

# Gets all tokens then were ever emitted minus burned tokens.
comx misc circulating-supply 

Completions

You can enable completions for your shell by running:

# On bash
comx --install-completion bash
# On zsh
comx --install-completion zsh

Contributing

Bug reports and pull requests and other forms of contribution are welcomed and encouraged! :)

To report a bug or request a feature, please open an issue on GitHub.

If you have any questions, feel free to ask on the CommuneX Discord channel or post on our GitHub discussions page.

To contribute to the codebase, using Poetry you can install the development dependencies with:

poetry install --with dev

it can require some enviroment-specific binaries to be installed

Commune compatibility

Yes, communex is compatible with the commune library/CLI. However, there are important considerations to note. communex verifies the integrity of your keys, which means that mixing certain types of keys is not permissible. Specifically, if you possess node keys or other similar types that are not designed to receive tokens, you to relocate them outside of the key directory.


Metadata

Release files for communex 0.1.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for communex 0.1.24
File Size Uploaded
communex-0.1.24.tar.gz 48.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for communex 0.1.24
File Interpreter ABI Platform
communex-0.1.24-py3-none-any.whl Python 3 none any Details

Total release size: 106.0 kB

Release files / communex-0.1.24.tar.gz

Download URL communex-0.1.24.tar.gz
Size 48.2 kB
Tags Source
SHA-256 checksum
How to use checksums
25c4381493571c8bf8b63b9b6b27b6b111dbcc4ba140e235ee2862ccfde03527
BLAKE2b-256 checksum
How to use checksums
0866741ece359d67ee9a93e2b94dd3afa74ca9f543df68a54c8fb4e3756be1d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.8 Linux/5.15.0-105-generic

Release files / communex-0.1.24-py3-none-any.whl

Download URL communex-0.1.24-py3-none-any.whl
Size 57.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdf197dddb5a1e2eb8d35890a6460f2db178a7267aa4ca608f7417cb65aa9650
BLAKE2b-256 checksum
How to use checksums
f2440b11e7dab16c9ce79d05911ab07145c7f581f57dc2b3bf305fcadb4a53ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.8 Linux/5.15.0-105-generic

Release history Release notifications | RSS feed

0.1.36

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.32

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.26

2 release files

This release

0.1.24 This release

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page