Skip to content

Client-side Python components using PyScript #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jun 22, 2024

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Jun 20, 2024

Description

PyScript is fully functional using the standard pyodide interpreter.

  • Client-side Python components can now be rendered via the new {% pyscript_component %} template tag
    • You must first call the {% pyscript_setup %} template tag to load PyScript dependencies
  • Client-side components can be embedded into existing server-side components via reactpy_django.components.pyscript_component.
  • Tired of writing JavaScript? You can now write PyScript code that runs directly within client browser via the reactpy_django.html.pyscript element.
    • This is a viable substitution for most JavaScript code.

A follow up PR will be required for a few things:

  1. Port reactpy to be micropython compatible.
  2. Support a fully local pyodide interpreter.

Checklist

Please update this checklist as you complete each item:

  • Tests have been developed for bug fixes or new functionality.
  • The changelog has been updated, if necessary.
  • Documentation has been updated, if necessary.
  • GitHub Issues closed by this PR have been linked.

By submitting this pull request I agree that all contributions comply with this project's open source license(s).

@Archmonger Archmonger changed the title Client-side Python components using PyScript! Client-side Python components using PyScript Jun 21, 2024
@Archmonger Archmonger linked an issue Jun 21, 2024 that may be closed by this pull request
@Archmonger Archmonger marked this pull request as ready for review June 22, 2024 10:23
@Archmonger Archmonger requested a review from a team as a code owner June 22, 2024 10:23
@Archmonger Archmonger merged commit fb6c258 into reactive-python:main Jun 22, 2024
8 checks passed
@Archmonger Archmonger deleted the pyscript-template-tag branch June 22, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client-side Python components
1 participant