Skip to main content

A package to parse pixy component files which allow you to author components in python

Project description

Pixy

Build

What is Pixy

pixy is a transpiler that transpiles pixy files into regular python code. Pixy files are JSX inspired component description formats that brings markup style declarative language natively embedded in python. Check out it's DESIGN.

Example

todo_page = (
    <div class_name="TodoList">
        <todo_list>
            <todo_item status={Status.Completed}>"Remember the milk 🥛"</todo_item>
            <todo_item status={Status.Todo}>"Eggs 🥚"</todo_item>
        </todo_list>
    </div>
    )

In order to actually transform that to a UI representation like HTML you need the sister 👩 package, render_html. A full example implementing a todo-list can be found in todo_pixy

Development

  1. git checkout github.com/pixyverse/pixy.git

  2. cd pixy

  3. create/install deps in a virtualenv environment and activate it.

    make venv
    source .venv/bin/activate
    
  4. lint and typecheck

    make lint
    make pie
    
  5. Run Tests

    # Run Tests
    make test
    
  6. Example Pixy file

    # a.pix
    comp=<div>"Hello World"</div>
    print(comp)
    

    Transpile

    # Transpile a sample pixy file
    python -m pixyverse.pixy -p test.pix -o test.py
    

Known Limitations

Strings within tags always need to be quoted within single or double quotes.

Development Status

Prototype stage. Liable to explode without warning

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

pixyverse_pixy-0.0.8.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

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

pixyverse.pixy-0.0.8-py3-none-any.whl (66.9 kB view details)

Uploaded Python 3

File details

Details for the file pixyverse_pixy-0.0.8.tar.gz.

File metadata

  • Download URL: pixyverse_pixy-0.0.8.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pixyverse_pixy-0.0.8.tar.gz
Algorithm Hash digest
SHA256 83b8380855d347b32414a78ad92c8838832d664baf7fa5bfbea7fe47b169a6fa
MD5 9c5e5f8a56298aa5cd1ec5db8ffeac21
BLAKE2b-256 81f21e3c714d7cbc7b0568cb59754cea219c26b47f33fccb499c93704c9b2a2c

See more details on using hashes here.

File details

Details for the file pixyverse.pixy-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: pixyverse.pixy-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 66.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pixyverse.pixy-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b5b1c5aaf3fc42e2f37a634bcfb003442e6e677185f9fdea7163ed1c04b8a0e3
MD5 1347c7f9ebd4e392954e363e4b9b1f40
BLAKE2b-256 87a6b282be360af8e32a97aad14ceeb7a9cd8031a992fc0e442f24101fe4d937

See more details on using hashes here.

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