1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# Copyright © 2025-2026 Wenze Wei. All Rights Reserved.
#
# This file is part of DMSC.
# The DMSC project belongs to the Dunimd Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================
# Python Project Configuration for DMSC
# =============================================================================
# This file configures the Python packaging and build system for the DMSC
# Rust-Python hybrid middleware framework. It uses maturin as the build
# backend to create Python extension modules from Rust source code.
#
# The project provides a high-performance middleware framework that combines
# Rust's performance with Python's ease of use, supporting features including
# authentication, caching, message queuing, API gateway, and observability.
#
# Relationship to Cargo.toml:
# - This file works in conjunction with Cargo.toml to build hybrid Rust-Python packages
# - The [tool.maturin] section references features defined in Cargo.toml
# - Version numbers should be kept in sync between both files
# - maturin reads Cargo.toml for Rust build configuration
# =============================================================================
# Build System Configuration
# =============================================================================
# Defines the build requirements and backend for compiling Rust code into
# Python extension modules. Maturin is the standard tool for building
# PyO3-based Python extensions from Rust projects.
#
# Build Process:
# 1. pip reads pyproject.toml to determine build system
# 2. pip installs maturin as the build backend
# 3. maturin reads Cargo.toml and compiles Rust code
# 4. maturin packages the compiled library as a Python wheel
[]
# Build dependencies required before building the package
# maturin>=1.0 is required for modern PyO3 support and build features
= ["maturin>=1.0"]
# The build backend that pip will use to build the package
# maturin handles the Rust compilation and Python packaging
= "maturin"
# =============================================================================
# Project Metadata
# =============================================================================
# Core project information including name, version, description, and
# authorship details. This metadata is used by PyPI and other package
# managers for distribution and discovery.
[]
# Package name on PyPI
# Must match the name used in 'pip install dmsc'
= "dmsc"
# Package version - should match Cargo.toml version
# Follows semantic versioning (MAJOR.MINOR.PATCH)
= "0.1.8"
# Short description displayed on PyPI and package listings
= "Dunimd Middleware Service - A high-performance Rust middleware framework with modular architecture"
# Path to the README file for long description on PyPI
= "README.md"
# Package authors list
= [{ = "Dunimd Team" }]
# License file path
= { = "LICENSE" }
# =============================================================================
# Platform and Interpreter Compatibility
# =============================================================================
# Specifies the supported Python versions and implementations. This ensures
# cross-version compatibility and helps users understand which Python
# environments can use this package.
= [
# Implementation language for the native extension
"Programming Language :: Rust",
# Supported Python implementations
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
# Supported Python versions (3.8 through 3.14)
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
# Minimum Python version requirement
# DMSC requires Python 3.8+ for modern async/await syntax support
= ">=3.8"
# Keywords for PyPI search and categorization
= ["middleware", "rust", "async", "gateway", "service-mesh"]
# Source code repository URL
= "https://github.com/mf2023/DMSC"
# =============================================================================
# Maturin Build Configuration
# =============================================================================
# Configures the maturin build tool for compiling Rust code into Python
# extension modules. Specifies the Python source directory and enables
# optional features that control which Rust modules are compiled.
[]
# Directory containing Python source files
# Python modules will be imported from this directory
= "python"
# Rust features to enable during the build
# These correspond to feature flags defined in Cargo.toml
# Each feature enables specific functionality in the DMSC framework:
# - pyo3: Python bindings support (required for Python extension)
# - auth: Authentication and authorization modules
# - cache: Caching layer with Redis support
# - queue: Message queue support (Redis and RabbitMQ)
# - gateway: API gateway functionality
# - observability: Metrics and monitoring with Prometheus
# - rabbitmq: RabbitMQ message broker integration
# - protocol: Protocol parsing and transformation
# - sqlite: SQLite database support
# - postgres: PostgreSQL database support
# - mysql: MySQL database support
# - service_mesh: Service mesh capabilities
# - parking_lot: Advanced synchronization primitives
# - http_client: HTTP client for external API calls
# - system_info: System information collection
# - config_hot_reload: Configuration file hot reloading
# - grpc: gRPC protocol support
# - websocket: WebSocket protocol support
# - kafka: Apache Kafka integration
# - etcd: etcd service discovery
= [
"pyo3",
"auth",
"cache",
"queue",
"gateway",
"observability",
"rabbitmq",
"protocol",
"sqlite",
"postgres",
"mysql",
"service_mesh",
"parking_lot",
"http_client",
"system_info",
"config_hot_reload",
"grpc",
"websocket",
"kafka",
]
# =============================================================================
# Python Extension Dependencies
# =============================================================================
# Additional Python-specific dependencies required for the extension module.
# These are separate from the Rust dependencies in Cargo.toml.
[]
# PyO3 version specification for the Python-Rust interface
# This version is locked to maintain compatibility with maturin
# PyO3 provides the FFI layer between Python and Rust code
= "^0.27"
# =============================================================================
# Pytest Configuration
# =============================================================================
# Configures pytest for running Python tests for the DMSC extension module.
[]
# Test discovery paths
= ["tests/Python"]
# File patterns for test discovery (default: test_*.py and *_test.py)
= ["test_*.py", "*_test.py"]
# Class patterns for test discovery
= ["Test*"]
# Function patterns for test discovery
= ["test_*"]
# Verbose output by default
= "-v"