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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maxx-0.8.1.tar.gz (926.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maxx-0.8.1-py3-none-any.whl (80.7 kB view details)

Uploaded Python 3

File details

Details for the file maxx-0.8.1.tar.gz.

File metadata

  • Download URL: maxx-0.8.1.tar.gz
  • Upload date:
  • Size: 926.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for maxx-0.8.1.tar.gz
Algorithm Hash digest
SHA256 7b9f22de6f01a04b2b5234a32e119e8db39a00a18901e469622b22aa188bfd78
MD5 8c110d73f0cb629542ff149e6ba2d7dc
BLAKE2b-256 362fba2510e576fdad61bfb5b150a75ca140d19740c5dda6241d7d6d0e87bc08

See more details on using hashes here.

File details

Details for the file maxx-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: maxx-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 80.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for maxx-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f761cbf9c23ceac80f731702be832080389d2a31dfb737c206d9e35a53396aaa
MD5 1cfd609613074c4912b1ea7d15a957d3
BLAKE2b-256 201e79da01758c7139b7cbee6ac8b9168ea722335346a8ff480d9bafde851aa0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 files

0.8.0

2 files

0.7.0

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page