Skip to main content

Python bindings for Facebook Yoga flexbox layout engine

Project description

pyyoga

Tests

Python bindings for Facebook Yoga flexbox layout engine.

Installation

pip install .

Quick Start

from pyyoga import Node, FlexDirection, Align, Justify

# Create a root node
root = Node()
root.width = 300
root.height = 400
root.flex_direction = FlexDirection.Column
root.align_items = Align.Center

# Add a child
child = Node()
child.width = 100
child.height = 100
root.add_child(child)

# Calculate layout
root.calculate_layout()

# Read results
print(f"Child position: ({child.layout_left}, {child.layout_top})")
print(f"Child size: {child.layout_width}x{child.layout_height}")

Features

  • Full binding to Yoga C++ API via pybind11
  • Pythonic wrapper with properties and idiomatic API
  • All Yoga enums exposed as Python enums
  • Support for custom configurations
  • Child management with Python list semantics

Building from Source

Requirements:

  • Python 3.10+
  • C++20 compiler
  • CMake 3.18+
pip install scikit-build-core pybind11
pip install -e .

Running Tests

pip install pytest
pytest tests/

License

MIT

Project details


Download files

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

Source Distribution

pyyoga-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distributions

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

pyyoga-0.1.0-pp310-pypy310_pp73-win_amd64.whl (2.2 MB view details)

Uploaded PyPyWindows x86-64

pyyoga-0.1.0-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (993.7 kB view details)

Uploaded PyPymanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyyoga-0.1.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl (815.8 kB view details)

Uploaded PyPymacOS 11.0+ ARM64

pyyoga-0.1.0-cp313-cp313-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.13Windows x86-64

pyyoga-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (997.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyyoga-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (818.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyyoga-0.1.0-cp312-cp312-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.12Windows x86-64

pyyoga-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (997.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyyoga-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (818.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyyoga-0.1.0-cp311-cp311-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.11Windows x86-64

pyyoga-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (996.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyyoga-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (817.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyyoga-0.1.0-cp310-cp310-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10Windows x86-64

pyyoga-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (994.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyyoga-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (815.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pyyoga-0.1.0.tar.gz.

File metadata

  • Download URL: pyyoga-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyyoga-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0824abd8d8a7e9c732456e79200ee452d86db533b907829c11d7c297db8831f9
MD5 095fe39451e78e7390e52d4920f473ab
BLAKE2b-256 2c166d7891480a97b4306b01586df5463d5fb7a56ea8d9cc28170e96944da95f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0.tar.gz:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 7f7d83392043ba43f48a9ee1305136dac6f93aa7f0f00ece8310ae8f6c76a86d
MD5 4c9004905f1ca0243818c4a7ba8e3c0c
BLAKE2b-256 a06009493de70f5ab08540e1971650f1939e69d794842635b38f1005faaa507d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-pp310-pypy310_pp73-win_amd64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 188e70fffdee56e702a86d9e44e2d6819a65a084a9361879a25b3a1ea654813e
MD5 eafb78f85b2d5f0a4b4d114a5c90422b
BLAKE2b-256 c56c7edf465646c42f2dd79c37e2d70390dac77d92408c22dd38c0f21d9ce59e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 684cfa6968b5d865a7cedf309fbbf8a5e9571d2deda91e05836c88e81c3e7ac8
MD5 0b95264c840745747b6774f96e3df382
BLAKE2b-256 144184c5aa2dfc80473ff944e0d54fa81e97a3ff31f8115490631aa2eda92c1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyyoga-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyyoga-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 69655a8de80f2b5dc8a26cf7b5ac32dd284ecab81a4e599cbea596a58ae99c5f
MD5 1a5c2694f0c8e5729ff6ae6799da6386
BLAKE2b-256 d6003d0e0b33ab1c43191595ef82d5dcc2a29bf5177ab5eaa30b8408088fc39c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a45dee72b67d3cbb224b6524fe75ad135f3bf7cbb30d0fcb8b0f3d35942b7a55
MD5 ef8e1e271665f2c16d5e043f8acf953d
BLAKE2b-256 b9b2db9e312a2438c675867092831b174fb25ed4b768c5cfe4e7d062d98401c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ba0aa34cd9219421096e2350b829dc43eba31cfc89b10a7064bdbcce4ac3f68
MD5 33f272e37a280be50addd6d9021f965a
BLAKE2b-256 b2656b7fb4d331697214a17fecbd96939f8cb808b49c720bec0cfb1af9464dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyyoga-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyyoga-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 515b20d0e1dd3df51a90acc231ec91f8795b87f075854c01c487061e5cd9fa04
MD5 93d45c6d4e29bdaeb2706f70aba183ea
BLAKE2b-256 14d802f3fb212a62f87f47001a58ae262bea3191f147b9831587d6fbac010813

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 323c5556ca2e295dda3673d9074d83a36c3b9a667897cbdb35fcd2bcba3c8517
MD5 dda8dd03aadd08027a89b898b8d0a541
BLAKE2b-256 a45f4eb1220e387f1346c9c7c306a51aa4fb170128de74079faa82883cb3b92d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8cdb0f07e57658f57dbf29a07d05b40ea3089236815acbc42f8289d953ddf8ed
MD5 a20fa2639641d873816aaf26cc03d438
BLAKE2b-256 7801943b2a2bbbd32ab6ec21a7587dadf988b19a628a815a243c6b2a047b4904

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyyoga-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyyoga-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 050b5acc74e4b3c479277a1209ecf0464d104c783b4506a046970f8187a2e5dd
MD5 80d589bb42c9289899256d159afd9868
BLAKE2b-256 2c132e63ac9faea7aac77439da81afb8ddab211b1ba8a70a2e8dbb677d732f01

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc0b6b93a2882c69365292684e2b2f9a0d7465aab82a6cee21c93addc1debe30
MD5 76666830f3dd33df883c9cc602d36ac2
BLAKE2b-256 eb2b6560c0116f2a34c596acd62294333f2abd335bfcf3c77536c0d55401e0e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13dc2cfde0cfd42a0b5a74ceb9456d31726b00f8821a06ef83eb8c57ed7ee919
MD5 acba2e80e6c977ec855abdc633bccfd4
BLAKE2b-256 9a7090d24e248e0c2410ff1e6e8746fde50feb42e6e2fd60a70b05c1c27fc7df

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyyoga-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyyoga-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c28764256e0fb2b14bc4b28ebcf89fec2b99296487898e9fa63278f301ecdccf
MD5 87c1347610fd8d75beb80f08ce9b95d8
BLAKE2b-256 8075b4188468a728eb966bddeb70af7c1c7162318143aeff86476b7baba13fbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ab6f3f1df5cba61685bad1ed8a2a94784dcb7e8f76d605eafbd42cceb51d996e
MD5 ea80feb3458143ea1dba9d6da7235678
BLAKE2b-256 51a82ac35aeb7a80f167b3bf10c3edd6ec0bfb70a8be42a4cda2bd144f7b322d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

File details

Details for the file pyyoga-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyyoga-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6e98307bf0ad991cb35e2bf49193562c1bbfdf688e5caa45bd5935b7a6befef
MD5 a1aac4d7ab600f06749cad6f1533aa90
BLAKE2b-256 b25a5b47f5691c372a0569debea5a97e7af9b815d03343df39d66cb43d4ea90b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyyoga-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on davidbrochart/pyyoga

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

Supported by

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