Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Oicana

Dynamic PDF Generation based on Typst.

Oicana offers seamless PDF templating. Define your templates in Typst, specify dynamic inputs, and generate high quality PDFs from your application code.

Installation

uv add oicana

Quick Start

import json
from oicana import Template, CompilationMode

# Load your template
with open("template.zip", "rb") as f:
    template_bytes = f.read()

# Create template and compile
with Template(template_bytes) as template:
    pdf = template.export(
        json_inputs={
            "invoice": json.dumps({
                "number": "INV-001",
                "items": [{"name": "Service", "price": 100}]
            })
        },
        export={"format": "pdf"},
        mode=CompilationMode.PRODUCTION,
    )

    # Save the PDF
    with open("output.pdf", "wb") as f:
        f.write(pdf)

Features

  • Multi-platform: Works on Linux, macOS, and Windows
  • Powerful Layouting: Full access to Typst's functionality
  • Performant: Native Rust performance via PyO3
  • Type Safe: Full type hints for IDE support
  • Pythonic: Context managers, dataclasses, and enums

Documentation

For more information, visit https://oicana.com/docs

Licensing

Oicana is source-available under PolyForm Noncommercial License 1.0.0. You can use it for free in any noncommercial context. For commercial use, please visit the Oicana website for pricing options.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oicana-0.8.0rc1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oicana-0.8.0rc1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file oicana-0.8.0rc1.tar.gz.

File metadata

  • Download URL: oicana-0.8.0rc1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oicana-0.8.0rc1.tar.gz
Algorithm Hash digest
SHA256 dc7acdc6830123fda8551df5a9063c0ce0e63cb06b5e5eeb3b43c787b1c752f0
MD5 c140f0bf03f6f334b0b6aa9d64840b54
BLAKE2b-256 ae2370ba0582f2a4c8879676da7d016108d5299a3b3d9d9ac347a1a2f0ef5261

See more details on using hashes here.

Provenance

The following attestation bundles were made for oicana-0.8.0rc1.tar.gz:

Publisher: publish-integration-python.yml on oicana/oicana

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oicana-0.8.0rc1-py3-none-any.whl.

File metadata

  • Download URL: oicana-0.8.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oicana-0.8.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 13b6849465986efe5660c59b0c318bd0402bb65c25ae5d594587d233cb928ac0
MD5 06cf1ac60ecd496fd344fa27dd66e044
BLAKE2b-256 159fceeae61db86f15c31add8dd504a55dae8a3ff2f4dd53062cd920da8a53da

See more details on using hashes here.

Provenance

The following attestation bundles were made for oicana-0.8.0rc1-py3-none-any.whl:

Publisher: publish-integration-python.yml on oicana/oicana

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.8.0rc1 This release

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page