Skip to main content

maxx

CI pypi version Python codecov License: GPL v3

malt logo, created by Mark Shui Hu

maxx (MATLAB Language Tools) is a Python library for parsing and analyzing MATLAB code. It provides comprehensive support for extracting signatures, documentation, and metadata from MATLAB projects including functions, classes, scripts, and packages.

Features

  • 🔍 Parse MATLAB files - Extract functions, classes, properties, and methods
  • 📁 Project structure analysis - Handle MATLAB packages, namespaces, and class folders
  • 📖 Documentation extraction - Parse docstrings and comments from MATLAB code
  • 🎯 Type information - Extract argument types, validation functions, and return types
  • 🌳 Tree-sitter based - Fast and accurate parsing using tree-sitter-matlab
  • 🔗 Integration ready - Built for documentation generators like MkDocs

Installation

Using pip:

pip install maxx

Using uv:

uv add maxx

Quick Start

Basic File Parsing

from pathlib import Path
from maxx.treesitter import FileParser

# Parse a MATLAB function file
parser = FileParser(Path("myfunction.m"))
matlab_object = parser.parse()

print(f"Object type: {matlab_object.kind}")
print(f"Name: {matlab_object.name}")
print(f"Arguments: {matlab_object.arguments}")
print(f"Docstring: {matlab_object.docstring}")

Project Collection

from maxx.collection import PathsCollection
from pathlib import Path

# Collect all MATLAB objects from a project
paths = PathsCollection([Path("src"), Path("examples")])

# Access parsed objects
my_function = paths["myfunction"]
my_class = paths["MyClass"]
my_package = paths["+mypackage.MyFunction"]

Working with Classes

# Access class members
matlab_class = paths["MyClass"]
print(f"Base classes: {matlab_class.bases}")
print(f"Properties: {list(matlab_class.members.keys())}")

# Access methods and properties
constructor = matlab_class.constructor
properties = [m for m in matlab_class.members.values() if m.is_property]

Supported MATLAB Constructs

  • Functions - Regular functions, nested functions, methods
  • Classes - Class definitions, properties, methods, inheritance
  • Scripts - Script files and their documentation
  • Packages - Namespace packages (+package) and class folders (@class)
  • Arguments blocks - Input/output validation and type information
  • Properties blocks - Class properties with attributes and validation

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Metadata

Release files for maxx 0.8.2

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

Source distribution (sdist)

Source distribution for maxx 0.8.2
File Size Uploaded
maxx-0.8.2.tar.gz 926.2 kB Details

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / maxx-0.8.2.tar.gz

Download URL maxx-0.8.2.tar.gz
Size 926.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ea4245d208d4af8c02b4d70501eae449a9afcc1b1ea05d368f24089c0a5b0f20
BLAKE2b-256 checksum
How to use checksums
7b250e5c4ed4d393df6c281a725e0539e5c86b33c88abfd740d770b9bf2b5643
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / maxx-0.8.2-py3-none-any.whl

Download URL maxx-0.8.2-py3-none-any.whl
Size 80.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f03fe0c7565df5d80b2e3634a8810998f10157a89b55b2e5ecbdff818bf186e
BLAKE2b-256 checksum
How to use checksums
561be9a9bef7745b0a86cfef6249220b663cdcabe0d72e236c98224f70687e64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

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