{"repo":"xnuinside/py-models-parser","free":true,"listed":false,"github":"https://github.com/xnuinside/py-models-parser","clone":"git clone https://github.com/xnuinside/py-models-parser.git","description":"Static Python models parser that extracts ORM, Pydantic, and dataclass models into a unified structure (no code execution).","language":"Python","stars":18,"topics":["pydantic","parser","python","models","orm","sqlalchemy","gino-orm","dataclasses","django-orm","classes"],"license":"MIT","category":"databases-storage","readme_excerpt":"Py-Models-Parser It's a second parser that I've created. The first is simple-ddl-parser for SQL DDL with different dialects. Py-Models-Parser can parse & extract information from models & table definitions: - SQLAlchemy ORM - Gino ORM - Tortoise ORM - Encode ORM - Django ORM - Pydantic v1 and v2 - Python Enum - Pony ORM - Piccolo ORM - PyDAL Tables - Python Dataclasses - Pure Python Classes - OpenAPI 3.0/Swagger Number of supported models will be increased. Check the 'TODO' section. If you want support for different model types, please open an issue. Py-Models-Parser is written with PEG parser and its Python implementation - parsimonious. It's pretty new and I did not cover all possible test cases, so if you have an issue - please just open an issue with an example, I will fix it as soon as possible. NOTE: This is a text parser, so it doesn't import or load your code. The parser works with source code as text, not objects in Python. So to run the parser you DO NOT NEED to install dependencies for models that you're trying to parse - only the models themselves. Output Format Py-Models-Parser takes different Python code with Models as input and provides output in a standard form: For ORM models, 'attrs' contains columns. Three keys - 'type', 'name', 'default' - exist in all parsed model attrs. The 'properties' key contains additional information depending on Model type. Installation Usage Parse from string Parse from file Parse OpenAPI/Swagger specifications CLI Output Example ","default_branch":null,"files":null,"tree":[],"storefront":"/r/xnuinside","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xnuinside/py-models-parser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}