https://github.com/dref360/pydantic2md
Convert Pydantic Objects to Markdown
https://github.com/dref360/pydantic2md
Last synced: 11 months ago
JSON representation
Convert Pydantic Objects to Markdown
- Host: GitHub
- URL: https://github.com/dref360/pydantic2md
- Owner: Dref360
- License: apache-2.0
- Created: 2024-03-30T19:12:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-30T19:15:22.000Z (about 2 years ago)
- Last Synced: 2025-06-28T20:06:01.045Z (12 months ago)
- Language: Python
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pydantic2md
Utility package to translate Pydantic models to markdown.
Useful for logging models in a [Gradio](https://www.gradio.app/)/[Streamlit](https://streamlit.io/) app or simply to generate reports.
It supports most common types, contributions are welcome!
## Usage
```python
from pydantic2md import pydantic2md
class Hero(BaseModel):
name: str
age: int
my_hero = Hero(name="Arthur", age=23)
print(pydantic2md(my_hero))
"""
# Hero
name (str): Arthur
age (int): 23
"""
```
## Roadmap
- [ ] Live Demo
- [ ] Support light tables