Python client library for EAPP (Ethos Apps Platform) - Auto-generated protobuf client code for seamless integration with EAPP services.
- π Package Index (HTML Preview) - View all available packages
- π Raw Package Index - Direct package index
- π₯ Latest Release - Download latest version
- ποΈ Build Status - Check CI/CD status
π View all available packages and versions in our Package Index (HTML Preview)
# Install from our package index
pip install --index-url https://raw.githubusercontent.com/50gramx/eapp-python-domain/master/packages/index.html eapp-python-domain
# Or install specific version
pip install --index-url https://raw.githubusercontent.com/50gramx/eapp-python-domain/master/packages/index.html eapp-python-domain==0.1.0.1752936352- Overview
- π Quick Start
- π¦ Installation
- π§ Usage
- π API Reference
- π Auto-Generation
- π€ Contributing
- π License
EAPP Python Domain provides auto-generated Python client code for all EAPP system contracts. This package is automatically generated from Protocol Buffer definitions and provides type-safe, efficient access to EAPP services.
- π Auto-Generated - Built from protobuf definitions in eapp-system-contracts
- π¦ Type-Safe - Full type hints and IDE support
- β‘ High Performance - Optimized protobuf serialization
- π Production Ready - Used in production EAPP services
- π Comprehensive - Covers all EAPP service contracts
| Service Category | Description | Available |
|---|---|---|
| π Identity | User authentication & authorization | β |
| π¬ Communication | Messaging & notifications | β |
| π§ Cognitive | AI & knowledge management | β |
| ποΈ Commerce | Transactions & payments | β |
| π Multiverse | Space & universe management | β |
# Install from our private package index
pip install --index-url https://raw.githubusercontent.com/50gramx/eapp-python-domain/master/packages/index.html eapp-python-domain
# Or install from PyPI (if published)
pip install eapp-python-domainfrom eapp_python_domain.ethos import user_pb2, account_pb2
# Create a user
user = user_pb2.User()
user.id = "user123"
user.name = "John Doe"
user.email = "john@example.com"
# Create an account
account = account_pb2.Account()
account.id = "acc123"
account.user_id = user.id
account.status = account_pb2.AccountStatus.ACTIVE
print(f"User: {user.name} ({user.email})")
print(f"Account: {account.id} - Status: {account.status}")import grpc
from eapp_python_domain.ethos import account_service_pb2, account_service_pb2_grpc
# Connect to EAPP service
channel = grpc.insecure_channel('localhost:50051')
stub = account_service_pb2_grpc.AccountServiceStub(channel)
# Create account request
request = account_service_pb2.CreateAccountRequest()
request.user_id = "user123"
request.account_type = account_service_pb2.AccountType.PERSONAL
# Call service
response = stub.CreateAccount(request)
print(f"Created account: {response.account.id}")- Python: 3.7+
- Dependencies:
protobuf>=3.21.0grpcio>=1.50.0
pip install --index-url https://raw.githubusercontent.com/50gramx/eapp-python-domain/master/packages/index.html eapp-python-domaingit clone https://github.com/50gramx/eapp-python-domain.git
cd eapp-python-domain
pip install -e .git clone https://github.com/50gramx/eapp-python-domain.git
cd eapp-python-domain
pip install -e ".[dev]"# Core entities
from eapp_python_domain.ethos import user_pb2
from eapp_python_domain.ethos import account_pb2
from eapp_python_domain.ethos import space_pb2
# Service stubs
from eapp_python_domain.ethos import account_service_pb2_grpc
from eapp_python_domain.ethos import user_service_pb2_grpc
from eapp_python_domain.ethos import space_service_pb2_grpcfrom eapp_python_domain.ethos import user_pb2
# Create messages
user = user_pb2.User(
id="user123",
name="John Doe",
email="john@example.com",
status=user_pb2.UserStatus.ACTIVE
)
# Serialize to bytes
user_bytes = user.SerializeToString()
# Deserialize from bytes
user_from_bytes = user_pb2.User()
user_from_bytes.ParseFromString(user_bytes)
# Convert to/from JSON
user_json = user.to_json()
user_from_json = user_pb2.User.from_json(user_json)import grpc
from eapp_python_domain.ethos import account_service_pb2, account_service_pb2_grpc
async def get_user_accounts(user_id: str):
async with grpc.aio.insecure_channel('localhost:50051') as channel:
stub = account_service_pb2_grpc.AccountServiceStub(channel)
request = account_service_pb2.GetUserAccountsRequest(user_id=user_id)
response = await stub.GetUserAccounts(request)
return response.accountsfrom eapp_python_domain.ethos import user_pb2
user = user_pb2.User(
id="string", # Unique user identifier
name="string", # Display name
email="string", # Email address
status=user_pb2.UserStatus.ACTIVE, # User status
created_at="timestamp", # Creation timestamp
updated_at="timestamp" # Last update timestamp
)from eapp_python_domain.ethos import account_pb2
account = account_pb2.Account(
id="string", # Unique account identifier
user_id="string", # Associated user ID
type=account_pb2.AccountType.PERSONAL, # Account type
status=account_pb2.AccountStatus.ACTIVE, # Account status
created_at="timestamp" # Creation timestamp
)from eapp_python_domain.ethos import space_pb2
space = space_pb2.Space(
id="string", # Unique space identifier
name="string", # Space name
description="string", # Space description
owner_id="string", # Owner user ID
type=space_pb2.SpaceType.PUBLIC, # Space type
created_at="timestamp" # Creation timestamp
)from eapp_python_domain.ethos import account_service_pb2_grpc
# Available methods:
# - CreateAccount(request)
# - GetAccount(request)
# - UpdateAccount(request)
# - DeleteAccount(request)
# - GetUserAccounts(request)from eapp_python_domain.ethos import user_service_pb2_grpc
# Available methods:
# - CreateUser(request)
# - GetUser(request)
# - UpdateUser(request)
# - DeleteUser(request)
# - ListUsers(request)This package is automatically generated from protobuf definitions in the eapp-system-contracts repository.
- Protobuf Changes - Updates to
.protofiles in system-contracts - CI/CD Trigger - GitHub Actions workflow automatically triggers
- Code Generation -
protocgenerates Python code from.protofiles - Package Building - Creates Python wheel and source distribution
- Release Creation - Creates GitHub release with new version
- Index Update - Updates package index with new release
- Auto-generated versions - Based on timestamp:
0.1.0.{timestamp} - Release frequency - On every protobuf change
- Backward compatibility - Maintained within major versions
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Update protobuf definitions in eapp-system-contracts
- Push to trigger auto-generation
- Review generated Python code
- Test with your changes
# Clone repository
git clone https://github.com/50gramx/eapp-python-domain.git
cd eapp-python-domain
# Install in development mode
pip install -e ".[dev]"
# Run tests
python -m pytest tests/
# Run linting
flake8 src/
black src/This project is licensed under the MIT License - see the LICENSE file for details.
- π¦ Package Index: View Packages
- ποΈ System Contracts: eapp-system-contracts
- π Issues: GitHub Issues
- π Documentation: API Docs
- π¬ Discussions: GitHub Discussions
Auto-generated Python client for EAPP System Contracts
Built with β€οΈ by the EAPP Team