Metadata-Version: 2.4
Name: matm-format
Version: 1.0.2
Summary: Mountain of Absurd Things by Markups
Author: Pupil DotTif
License: # MIT License
        
        Copyright (c) 2024 Pupil DotTif
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# MATM - Mountain of Absurd Things by Markups

Version: 1.0.0

## Description

MATM is a data format. Supports strings, numbers, booleans.
Files use .matm extension.

## Installation

pip install matm-format

## Functions

### importmatm(file)

Reads .matm file and returns a dictionary.

Parameters:
- file (str) - path to .matm file

Returns:
- dict - loaded data
- str - error message (if file is corrupted)

### writematm(typo, var, value, file)

Appends a record to .matm file.

Parameters:
- typo (str) - type: string, int, float, bool
- var (str) - variable name
- value - value
- file (str) - path to .matm file

## Example

Writing to file:

from matm import writematm

writematm("string", "name", "John", "data.matm")
writematm("int", "age", 25, "data.matm")
writematm("bool", "active", True, "data.matm")

Reading from file:

from matm import importmatm

data = importmatm("data.matm")
print(data.get("name"))
print(data.get("age"))
print(data.get("active"))

## .matm file format

Each line contains:

type name > value

Example data.matm content:

string name > John
int age > 25
bool active > True
float pi > 3.14

## Data types

string - text
int - integer number
float - floating point number (dot or comma separator)
bool - True or False

## Error handling

On syntax error, an educational video opens.
Error message returns in English.

## License

MIT

Copyright (c) 2026 Pupil DotTif
