Python binding to typst
Project description
typst-py
Python binding to typst, a new markup-based typesetting system that is powerful and easy to learn.
Installation
pip install typst
Usage
import typst
# Compile `hello.typ` to PDF and save as `hello.pdf`
typst.compile("hello.typ", output="hello.pdf")
# Compile `hello.typ` to PNG and save as `hello.png`
typst.compile("hello.typ", output="hello.png", format="png", ppi=144.0)
# Or return PDF content as bytes
pdf_bytes = typst.compile("hello.typ")
# Also for svg
svg_bytes = typst.compile("hello.typ", format="svg")
# Or use Compiler class to avoid reinitialization
compiler = typst.Compiler("hello.typ")
compiler.compile(format="png", ppi=144.0)
License
This work is released under the Apache-2.0 license. A copy of the license is provided in the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
typst-0.11.0.tar.gz
(4.7 MB
view hashes)
Built Distributions
typst-0.11.0-cp37-abi3-win32.whl
(14.5 MB
view hashes)
Close
Hashes for typst-0.11.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90a6b4f446e9f91c11afc9382cbc367a8de8335ca93aa70e7ae86028db6128ce |
|
MD5 | ff8dacc25fb3b446391fd0952edb0f48 |
|
BLAKE2b-256 | 4268b344d49722cc84de749a0e1327977bb29e4b4d34b4261f096b024381f619 |
Close
Hashes for typst-0.11.0-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 541dc6f3e9252af69542750eec49768979fc40bd07f88f09c22693e36a35dc26 |
|
MD5 | 450ee4cf8b2992fb2797649adf658044 |
|
BLAKE2b-256 | 19657e7279830a3a3ca1211642a24ced87cf2d1724673ef6dd806cc945e8b255 |
Close
Hashes for typst-0.11.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d657cc72e964da669126ab2d4c81c9e71aa4de247f1883090d7d91939d5fe7 |
|
MD5 | a1ae97049bf29a0abb7b13fac71401c3 |
|
BLAKE2b-256 | 23ea6b7ede7d65c570e366861b58927c07bdf076ce51641c525b145f24dd5bbb |
Close
Hashes for typst-0.11.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0896bd85527ff60b6007db2cf34f5712efab3b8e9c7018ab68f5732d53313db9 |
|
MD5 | 5dad544be34095f622be9ebafa8b4072 |
|
BLAKE2b-256 | 7a6c7bea3e54c7a9054ee9d440da71a81d723dba92100f13aa74d812e454e7ae |
Close
Hashes for typst-0.11.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16b58b0d17b8758ad4bfd84738790d56707891c4463cf6b338cb1ff0140b6439 |
|
MD5 | ec5c4c96b9fb5479329fcba474e12b72 |
|
BLAKE2b-256 | 6cc80e10cb4987c4dfd6dba7309b8047a0565ae5728d1d4cc62af1ca092a01b8 |
Close
Hashes for typst-0.11.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7db094d253771b9ff4ee83f50a636cd1580d650a573e645155da666e4a5ed6e3 |
|
MD5 | 797fcd1f104dc4860f20f16b23f84360 |
|
BLAKE2b-256 | cb59b38c9f5b6e9ce720cf457435fc277ff6a8645fcb1755ef734b910eedfc38 |
Close
Hashes for typst-0.11.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 040710d9c4e9b599c7ea08a1fbc99cddffd3ee43783e32239a42480770dff181 |
|
MD5 | 1d76d47acdf3e512076ea42ef6e927d1 |
|
BLAKE2b-256 | c18c92e1a4c7dfae3f31224fb43ba408e929cecdd64d643488d8c12756e5da96 |
Close
Hashes for typst-0.11.0-cp37-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fcb28236c287c8fbacc5cbe47fe0c3be927bdb21a8a179d3053e48d6ce7b704 |
|
MD5 | ca9f6339fe0858ff7658efbe4b3abace |
|
BLAKE2b-256 | 22843c79d88a1f073e589f3d25d7abd154a2c546eb54c41d6d36dccad3356be2 |
Close
Hashes for typst-0.11.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c57a7d759db90b8d323bb8fc0c318f0cc040e4d019d1b548aaf33f2ef565220 |
|
MD5 | a4a6a8499ece3e05fd146eca7711a279 |
|
BLAKE2b-256 | c61a1780ce9f8bef3f613e1a6c7c7f33c5a417e53fa531873a2f681c51cb86db |
Close
Hashes for typst-0.11.0-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b21f70e3138cb62c3f30f6cd0292edc9e4e533120b8b180f190b6e1fbf42e9b7 |
|
MD5 | 89930fec3187bbd8a45c701eda122cc9 |
|
BLAKE2b-256 | 074352dffd6e61e2ca0a353f5a91516172cf1aabf2dfb2be56a35ae41f69df05 |