peasy-document
Async Rust client for the PeasyFormats API -- convert between Markdown, JSON, YAML, CSV, and other document formats with tools for format identification, MIME type lookup, and structured data transformation. Built with reqwest, serde, and tokio.
Built from PeasyFormats, a comprehensive document conversion toolkit offering free online tools for transforming between structured data formats. The glossary covers document formats from lightweight Markdown to structured JSON and YAML, while guides explain format conversion strategies and encoding best practices.
Try the interactive tools at peasyformats.com -- Markdown to HTML, YAML/JSON Converter, Format Identifier, and more.
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Client
- Learn More About Document Formats
- Also Available
- Peasy Developer Tools
- License
Install
[]
= "0.2.0"
= { = "1", = ["full"] }
Or via cargo:
Quick Start
use Client;
async
What You Can Do
Document Conversion Tools
Document format conversion is a core workflow for developers, data engineers, and content authors. Converting Markdown to HTML powers static site generators and documentation systems. Transforming JSON to YAML (and vice versa) is essential for configuration management across Kubernetes, Docker Compose, and CI/CD pipelines. CSV-to-JSON conversion bridges the gap between spreadsheet data and web APIs.
| Tool | Description | Use Case |
|---|---|---|
| Markdown to HTML | Convert Markdown syntax to semantic HTML | Static sites, documentation pipelines |
| YAML/JSON Converter | Bidirectional YAML and JSON transformation | Kubernetes configs, API payloads |
| Format Identifier | Detect file format from content or extension | File upload validation, data pipelines |
use Client;
async
Learn more: Markdown to HTML Tool · YAML/JSON Converter · File Format Conversion Guide
Browse Document Format Reference
The document format glossary provides clear definitions for structured data formats, markup languages, and serialization standards. Understanding the differences between JSON and YAML syntax, when CSV is preferable to JSON for tabular data, and how Markdown flavors (CommonMark, GFM) differ helps developers choose the right format for each use case.
| Glossary Term | Description |
|---|---|
| Markdown | Lightweight markup language for creating formatted text with plain-text syntax |
| CSV | Comma-separated values format for tabular data interchange |
| JSON | JavaScript Object Notation for structured data serialization |
| YAML | Human-readable data serialization format used in configuration files |
// Browse document format glossary terms
let glossary = client.list_glossary.await?;
for term in &glossary.results
// Read in-depth guides on format conversion strategies
let guides = client.list_guides.await?;
for guide in &guides.results
Learn more: Markdown Glossary · JSON Glossary · How to Convert Markdown to Other Formats
Search and Discovery
The unified search endpoint queries across all document tools, glossary terms, guides, and supported file formats simultaneously. This is useful for building editor plugins, documentation search, or data pipeline tools that need to discover conversion capabilities.
// Search across all document tools, glossary, and guides
let results = client.search.await?;
println!; // Cross-content document format search results
Learn more: CSV Glossary · YAML Glossary · All Document Guides
API Client
The client wraps the PeasyFormats REST API with strongly-typed Rust structs using serde deserialization.
use Client;
async
Available Methods
| Method | Description |
|---|---|
list_tools(&opts) |
List tools (paginated, filterable) |
get_tool(slug) |
Get tool by slug |
list_categories(&opts) |
List tool categories |
list_formats(&opts) |
List file formats |
get_format(slug) |
Get format by slug |
list_conversions(&opts) |
List format conversions |
list_glossary(&opts) |
List glossary terms |
get_glossary_term(slug) |
Get glossary term |
list_guides(&opts) |
List guides |
get_guide(slug) |
Get guide by slug |
list_use_cases(&opts) |
List use cases |
search(query, limit) |
Search across all content |
list_sites() |
List Peasy sites |
openapi_spec() |
Get OpenAPI specification |
Full API documentation at peasyformats.com/developers/. OpenAPI 3.1.0 spec: peasyformats.com/api/openapi.json.
Learn More About Document Formats
- Tools: Markdown to HTML · YAML/JSON Converter · Format Identifier · All Tools
- Guides: File Format Conversion Guide · How to Convert Markdown to Other Formats · All Guides
- Glossary: Markdown · CSV · JSON · YAML · All Terms
- Formats: All Formats
- API: REST API Docs · OpenAPI Spec
Also Available
| Language | Package | Install |
|---|---|---|
| Python | peasy-document | pip install "peasy-document[all]" |
| TypeScript | peasy-document | npm install peasy-document |
| Go | peasy-document-go | go get github.com/peasytools/peasy-document-go |
| Ruby | peasy-document | gem install peasy-document |
Peasy Developer Tools
Part of the Peasy Tools open-source developer ecosystem.
| Package | PyPI | npm | crates.io | Description |
|---|---|---|---|---|
| peasy-pdf | PyPI | npm | crate | PDF merge, split, rotate, compress -- peasypdf.com |
| peasy-image | PyPI | npm | crate | Image resize, crop, convert, compress -- peasyimage.com |
| peasy-audio | PyPI | npm | crate | Audio trim, merge, convert, normalize -- peasyaudio.com |
| peasy-video | PyPI | npm | crate | Video trim, resize, thumbnails, GIF -- peasyvideo.com |
| peasy-css | PyPI | npm | crate | CSS minify, format, analyze -- peasycss.com |
| peasy-compress | PyPI | npm | crate | ZIP, TAR, gzip compression -- peasytools.com |
| peasy-document | PyPI | npm | crate | Markdown, HTML, CSV, JSON conversion -- peasyformats.com |
| peasytext | PyPI | npm | crate | Text case conversion, slugify, word count -- peasytext.com |
Embed Widget
Embed PeasyDocument widgets on any website with peasy-document-embed:
Zero dependencies · Shadow DOM · 4 themes (light/dark/sepia/auto) · Widget docs
License
MIT