Python OOUI (Open Object User Interface) is a Python port of ooui.js, providing powerful tools for data visualization and processing.
- Graph Processing: Create line charts, bar charts, pie charts, and indicators
- Tree Views: Handle structured data with advanced filtering and conditional formatting
- Data Helpers: Utilities for domain parsing, condition evaluation, and data aggregation
- XML Parsing: Parse XML-based graph and tree definitions
- Cross-Platform: Compatible with Python 2.7+ and Python 3.x
pip install ooui
from ooui.graph import parse_graph
from ooui.tree import parse_tree
# Create a line chart
graph_xml = '''
<graph type="line" string="Sales Trend">
<field name="date" type="date"/>
<field name="amount" type="float" operator="sum"/>
</graph>
'''
graph = parse_graph(graph_xml)
# Create a tree view
tree_xml = '''
<tree string="Customer List" editable="top">
<field name="name"/>
<field name="email"/>
<field name="status"/>
</tree>
'''
tree = parse_tree(tree_xml)
📚 Complete Documentation - Start here for comprehensive guides and examples
- Installation Guide - Detailed setup instructions
- Usage Guide - Core concepts and basic usage
- API Reference - Complete API documentation
- Examples - Practical code examples
- Advanced Usage - Complex scenarios and advanced features
from ooui.graph import parse_graph
# Support for multiple chart types
graph = parse_graph(xml_definition)
result = graph.process(data, fields)
from ooui.tree import parse_tree
# Structured data with conditional formatting
tree = parse_tree(xml_definition)
conditional_fields = tree.fields_in_conditions
from ooui.helpers import ConditionParser
parser = ConditionParser("red:amount < 100;green:amount >= 100")
result = parser.eval({'amount': 150}) # Returns "green"
from ooui.helpers import Domain
domain = Domain("[('active', '=', True), ('age', '>', 18)]")
parsed = domain.parse({'user_id': 42})
# Clone the repository
git clone https://github.com/gisce/python-ooui.git
cd python-ooui
# Install in development mode
pip install -e .
# Install development dependencies
pip install -r requirements-dev.txt
# Run all tests
mamba
# Tests use mamba (BDD testing framework)
# See spec/ directory for test specifications
ooui/
├── graph/ # Graph processing (charts, indicators)
├── tree/ # Tree view processing
└── helpers/ # Utilities (conditions, domain, dates, etc.)
Contributions are welcome! Please:
- Check the documentation to understand the project
- Review existing examples and API reference
- Follow the existing code style and patterns
- Add tests for new functionality
- Update documentation as needed
MIT License - see LICENSE file for details.
Developed by GISCE for the GISCE-ERP project.
For more information, visit the complete documentation.