Commune: Modular Consensus System
Commune AI provides a powerful framework for building distributed AI applications with modular consensus mechanisms. The system enables seamless integration of AI models, distributed computing, and blockchain technology.
Features
These components can be applied to:
- 🔗 Networks - Create and manage distributed networks with custom consensus mechanisms
- 🤖 AI Models - Deploy and serve AI models in a distributed environment
- 💫 Modules - Build modular components that can be composed into larger systems
- 🔑 Keys - Manage cryptographic keys and identities securely
- 🖥️ Servers - Deploy and monitor distributed services
- ✨ Validation - Implement custom validation rules and scoring mechanisms
Quick Tour
To immediately start using Commune, you can create and serve a module with just a few lines of code:
import commune as c
# Create a simple module
class MyModule(c.Module):
def __init__(self, param1=1):
self.set_config(locals())
def forward(self, x):
return x * self.param1
# Serve the module
module = c.serve('MyModule')
Basic CLI usage:
# Create a new module
>>>c new_module my_module
# Serve a module
>>>c serve my_module
# Call a module function
>>>c call my_module/forward 10
Installation
With pip
pip install commai
From source
git clone https://github.com/commune-ai/commune.git
cd commune
pip install -e .
Development setup
chmod +x ./run/***
sudo ./run/install.sh # Install development environment
Core Components
1. Module System
Modules are the building blocks of Commune applications:
import commune as c
class CustomModule(c.Module):
def __init__(self, config=None):
self.set_config(config)
def process(self, data):
return self.model(data)
2. Network Management
Create and manage distributed networks:
# Start a local network
c.serve('mymodule', network='local')
# Join a subnet
c.serve('mymodule', network='subspace', netuid=0)
3. Validation System
Implement custom validation rules:
class Validator(c.Module):
def validate(self, module):
score = self.evaluate_performance(module)
return score
CLI Reference
Commune provides an intuitive CLI interface:
# Module operations
c new_module <name> # Create new module
c serve <module> # Serve module
c call <module>/<function> # Call module function
c modules # List modules
# Key management
c add_key <name> # Generate new key
c keys # List keys
c sign <message> # Sign message
# Server management
c servers # List servers
c connect <module> # Connect to server
c logs <module> # View logs
Why Commune?
-
Modular Design:
- Build complex systems from simple components
- Easy-to-use module system
- Flexible composition of services
-
Distributed Computing:
- Scale across multiple nodes
- Built-in consensus mechanisms
- Robust networking layer
-
AI Integration:
- Deploy AI models as services
- Distributed training support
- Model validation and scoring
-
Security:
- Built-in key management
- Secure communication
- Validation mechanisms
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
Metadata
Release files for commai 0.0.2
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 |
|---|---|---|---|---|
| commai-0.0.2.tar.gz | 68.1 kB | Without provenance | Details for commai-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| commai-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for commai-0.0.2-py3-none-any.whl |
Total release size: 146.4 kB
Release files / commai-0.0.2.tar.gz
| Download URL | commai-0.0.2.tar.gz |
|---|---|
| Size | 68.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
704ae395315e9da9f7ef75bca0803a3eae0cbe756c89e27624ce971520f4b5be
|
|
BLAKE2b-256 checksum How to use checksums |
4a0950e2da0960bca522806c5187d0b276f9dc279ca71c7eda3d4197aaa9686c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
|
Release files / commai-0.0.2-py3-none-any.whl
| Download URL | commai-0.0.2-py3-none-any.whl |
|---|---|
| Size | 78.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2686ee4b7d49ad492f51b6106f077a775aee3fd85c7eda0f1bd81d953dfbf02f
|
|
BLAKE2b-256 checksum How to use checksums |
6e1d685eea24cf60ee43f04c0af457c86cf47491340da234bfecefd0406dd0f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
|
Security for commai 0.0.2
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.