Skip to main content

PyPI - Python Version

Snippettoni

🍝 Snippettoni

Snippettoni is a Python library that helps you generate the x-codeSamples extension for OpenAPI specifications. It supports multiple programming languages and allows you to use custom templates or extend the library with your own logic. Inspired by the deliciousness of "maccheroni" and the elegance of code snippets, Snippettoni serves up tasty examples for your API documentation.

Install

$ pip install snippettoni

## Usage

$ snippettoni --output enriched_openapi_spec.yaml openapi_spec.yaml
$ snippettoni --help

 Usage: snippettoni [OPTIONS] SPEC_PATH

╭─ Arguments ─────────────────────────────────────────────────────────────╮
│ *    spec_path      PATH  Path to OpenAPI spec YAML or JSON file.       │
│                           [default: None]                               │
│                           [required]                                    │
╰─────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────╮
│ --base-url                  TEXT  Base URL for code examples.           │
│                                   [default: None]                       │
│ --lang                      TEXT  Languages to generate (e.g. --lang    │
│                                   python --lang curl).Default is all    │
│                                   templates in directory.               │
│                                   [default: None]                       │
│ --template                  TEXT  Override or add templates per         │
│                                   language, e.g. --template lang:path   │
│                                   [default: None]                       │
│ --output                    PATH  Optional output file path. Defaults   │
│                                   to stdout in same format as input.    │
│                                   [default: None]                       │
│ --install-completion              Install completion for the current    │
│                                   shell.                                │
│ --show-completion                 Show completion for the current       │
│                                   shell, to copy it or customize the    │
│                                   installation.                         │
│ --help                            Show this message and exit.           │
╰─────────────────────────────────────────────────────────────────────────╯

License

Snippettoni is licensed under Apache 2.0 License.

Metadata

Release files for snippettoni 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snippettoni 0.1.2
File Size Uploaded Provenance
snippettoni-0.1.2.tar.gz 1.6 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for snippettoni 0.1.2
File Interpreter ABI Platform
snippettoni-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / snippettoni-0.1.2.tar.gz

Download URL snippettoni-0.1.2.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
38c1dbd87f6a12d1801362cd41e4d68eb40e29141597fcc914110cc70592590a
BLAKE2b-256 checksum
How to use checksums
a54bc776b1e1cc65e181e413c0a328e55bef5c6fccaa08aceffd81cb5866a2b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.2

Release files / snippettoni-0.1.2-py3-none-any.whl

Download URL snippettoni-0.1.2-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b0d409b07cb223b601e508a0a6fed65479318f5230a0b3fa8b7402a903ead17
BLAKE2b-256 checksum
How to use checksums
84d6da6aaeedc1e3cfd124c9f23bb4b4347ebde70d307d827964079dd8ab8209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.2

Security for snippettoni 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page