# Python Viewer Samples

Sample Python source files (classes, dataclasses, async/await) for the in-browser Python Viewer

> Canonical page: https://elysiatools.com/en/samples/py-viewer-samples

- **Category:** Development

- **Keywords:** python, py, script, viewer

## Overview

Sample Python source files (classes, dataclasses, async/await) for the in-browser Python Viewer

## Examples

- **Classes & List Comprehension**: A Python example with a typed class and a list comprehension filter
- **Dataclasses & Decorators**: Python dataclasses, field defaults, and an lru_cache decorator
- **Async / Await**: Async/await with an async context manager and asyncio.gather

## When to use

- Use this sample set when you want reference inputs for Python Viewer Samples.
- Use it to preview output formats and compare related sample variants.

## How it works

- Open a sample entry to inspect the prepared example payload or asset.
- Compare it with related tools to understand how the workflow connects.

## Use cases

- Classes & List Comprehension
- Dataclasses & Decorators
- Async / Await

## Frequently asked questions

### What is included in Python Viewer Samples?

This page includes curated sample entries, related tools, and neighboring sample collections for Python Viewer Samples.

## Related tools

- [Hex Editor (File Viewer)](https://elysiatools.com/en/tools/hex-editor): Upload any binary file and inspect it as a classic hex dump with offset, hex bytes, and ASCII columns (read-only)
- [3D Model Viewer & Inspector](https://elysiatools.com/en/tools/3d-model-viewer): Upload an STL, OBJ, GLB or glTF model: exact vertex/triangle counts, bounding-box dimensions, materials, animations and node tree, plus an interactive Three.js viewer (rotate, zoom, shaded/wireframe/normals).
- [cURL to Python (requests) Converter](https://elysiatools.com/en/tools/curl-to-python): Convert a cURL command into a Python requests code snippet with headers, data, and method
- [Batch Image Info Viewer](https://elysiatools.com/en/tools/image-batch-info): View basic information for multiple images at once - dimensions, format, file size, and metadata presence
- [Batch EXIF Viewer](https://elysiatools.com/en/tools/image-exif-batch-view): View EXIF metadata from multiple images at once
- [Audio Metadata Viewer](https://elysiatools.com/en/tools/audio-metadata-viewer): View all metadata tags of an audio file
- [PDF Code Snippet Viewer](https://elysiatools.com/en/tools/pdf-code-snippet-viewer): Render code snippets with mono font, background boxes, and clickable Git repository links
- [CSV File Merger](https://elysiatools.com/en/tools/csv-merger): Merge multiple CSV files into a single file with options for header handling and deduplication

## Related content

- [Code Documentation Samples](https://elysiatools.com/en/samples/docstring-extractor): Code samples with various documentation styles including JSDoc, JavaDoc, Python docstrings, and TypeScript annotations
- [HTML Viewer Samples](https://elysiatools.com/en/samples/html-viewer-samples): Sample HTML files (semantic page, form, landing page) for the in-browser HTML Viewer
- [XML Viewer Samples](https://elysiatools.com/en/samples/xml-viewer-samples): Sample XML files (bookstore, RSS feed, SVG) for the in-browser XML Viewer
- [Hardhat Development Framework Samples](https://elysiatools.com/en/samples/hardhat-samples): Hardhat Ethereum development environment examples including smart contracts, testing, deployment, scripts, plugins, and development workflows
- [Copyright-Free MP3 Audio Samples](https://elysiatools.com/en/samples/mp3-samples): Collection of royalty-free audio samples for testing and development purposes including nature sounds, meditation music, and ambient audio
- [PDF Samples](https://elysiatools.com/en/samples/pdf-samples): Generated PDF samples from tools dated 2026-02-01 to 2026-02-10
