peasytext
Async Rust client for the PeasyText API -- text case conversion, slug generation, word counting, and encoding utilities with tools for camelCase, snake_case, kebab-case, PascalCase, and more. Built with reqwest, serde, and tokio.
Built from PeasyText, a comprehensive text processing toolkit offering free online tools for case conversion, slug generation, word counting, and text analysis. The glossary covers text concepts from character encodings to Unicode normalization, while guides explain text processing strategies and encoding best practices.
Try the interactive tools at peasytext.com -- Text Counter, Case Converter, Slug Generator, and more.
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Client
- Learn More About Text Processing
- Also Available
- Peasy Developer Tools
- License
Install
[]
= "0.2.0"
= { = "1", = ["full"] }
Or via cargo:
Quick Start
use Client;
async
What You Can Do
Text Processing Tools
Text transformation is fundamental to software development -- from generating URL-safe slugs for blog posts to converting variable names between camelCase and snake_case during code generation. Case conversion tools handle the mechanical work of transforming text between naming conventions used across programming languages (camelCase in JavaScript, snake_case in Python, kebab-case in CSS). Word counting and character analysis help content authors meet length requirements for SEO titles, meta descriptions, and social media posts.
| Tool | Description | Use Case |
|---|---|---|
| Text Counter | Count words, characters, sentences, and paragraphs | Content length validation, SEO metadata |
| Case Converter | Convert between camelCase, snake_case, kebab-case, PascalCase | Code generation, API field mapping |
| Slug Generator | Create URL-safe slugs from any text input | Blog posts, CMS content, URL routing |
use Client;
async
Learn more: Text Counter · Case Converter · Text Encoding Guide
Browse Text Reference Content
The text processing glossary explains key concepts from basic character encodings to advanced Unicode normalization forms. Understanding the difference between ASCII and UTF-8, how byte order marks (BOM) affect file parsing, and when to use URL encoding versus Base64 helps developers handle text data correctly across platforms and programming languages.
| Glossary Term | Description |
|---|---|
| Slug | URL-safe string derived from a title or phrase, using hyphens and lowercase |
| Case Conversion | Transforming text between naming conventions like camelCase and snake_case |
| UTF-8 | Variable-width character encoding capable of representing all Unicode code points |
| Whitespace | Characters representing horizontal or vertical space in text rendering |
// Browse text processing glossary terms
let glossary = client.list_glossary.await?;
for term in &glossary.results
// Read in-depth guides on text encoding and conversion
let guides = client.list_guides.await?;
for guide in &guides.results
Learn more: Slug Glossary · ASCII Glossary · Regex Cheat Sheet
Search and Discovery
The unified search endpoint queries across all text tools, glossary terms, guides, and supported formats simultaneously. This is useful for building text editor plugins, documentation search, or CLI tools that need to discover text processing capabilities.
// Search across all text tools, glossary, and guides
let results = client.search.await?;
println!; // Cross-content text processing search results
Learn more: BOM Glossary · Slug Generator · All Text Guides
API Client
The client wraps the PeasyText 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 peasytext.com/developers/. OpenAPI 3.1.0 spec: peasytext.com/api/openapi.json.
Learn More About Text Processing
- Tools: Text Counter · Case Converter · Slug Generator · All Tools
- Guides: Text Encoding Guide · Regex Cheat Sheet · All Guides
- Glossary: Slug · ASCII · BOM · All Terms
- Formats: TXT · CSV · All Formats
- API: REST API Docs · OpenAPI Spec
Also Available
| Language | Package | Install |
|---|---|---|
| Python | peasytext | pip install "peasytext[all]" |
| TypeScript | peasytext | npm install peasytext |
| Go | peasytext-go | go get github.com/peasytools/peasytext-go |
| Ruby | peasytext | gem install peasytext |
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 |
License
MIT