Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simon-ritchie/apysc
apysc (pronounced æpisk) is a Python frontend library to create HTML and JavaScript, inspired by ActionScript 3 (as3) and Flutter.
https://github.com/simon-ritchie/apysc
actionscript animation as3 drawing frontend graphics html javascript pip pypi python python-3 python-frontend-library python3 svg ui ui-components vector-graphics visualization web
Last synced: 5 days ago
JSON representation
apysc (pronounced æpisk) is a Python frontend library to create HTML and JavaScript, inspired by ActionScript 3 (as3) and Flutter.
- Host: GitHub
- URL: https://github.com/simon-ritchie/apysc
- Owner: simon-ritchie
- License: mit
- Created: 2021-01-30T11:17:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-30T11:02:20.000Z (about 2 months ago)
- Last Synced: 2025-02-07T02:15:20.828Z (13 days ago)
- Topics: actionscript, animation, as3, drawing, frontend, graphics, html, javascript, pip, pypi, python, python-3, python-frontend-library, python3, svg, ui, ui-components, vector-graphics, visualization, web
- Language: Python
- Homepage:
- Size: 50.7 MB
- Stars: 24
- Watchers: 2
- Forks: 2
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# apysc
[](https://github.com/simon-ritchie/apysc/actions/workflows/deploy_to_pypi.yml)
[](https://github.com/simon-ritchie/apysc/actions/workflows/codeql_analysis.yml)

[](https://badge.fury.io/py/apysc)

[](https://github.com/simon-ritchie/apysc/blob/main/LICENSE)





Language: | English | [日本語 (Japanese)](https://github.com/simon-ritchie/apysc/blob/main/README_JP.md) |
apysc (pronounced `æpisk`) is a Python frontend library to create HTML and JavaScript, inspired by ActionScript 3 (as3) and Flutter.
Notes: Currently developing and only works partially.
## Supported Python Version
Python 3.8 or later.
## Installing
Pip command is available:
```
$ pip install apysc
```## What's new
To check the major features updating and destructive changes, please see the Discussions' [Announcements](https://github.com/simon-ritchie/apysc/discussions/categories/announcements) and [Destructive changes](https://github.com/simon-ritchie/apysc/discussions/categories/destructive-changes).
## How to start
Please see [apysc documentation](https://simon-ritchie.github.io/apysc/en/index.html) and [quick start guide](https://simon-ritchie.github.io/apysc/en/quick_start.html) page.
## What apysc can do in its current implementation
- **Save HTML or use it on the Jupyter Notebook, JupyterLab, and Google Colaboratory!**

Documents:
- [save_overall_html interface](https://simon-ritchie.github.io/apysc/en/save_overall_html.html)
- [display_on_jupyter interface](https://simon-ritchie.github.io/apysc/en/display_on_jupyter.html)
- [display_on_colaboratory interface](https://simon-ritchie.github.io/apysc/en/display_on_colaboratory.html)---
- **Draw the many types of vector graphics**

Example code fragments:
```py
...
sprite.graphics.begin_fill(color=ap.Color("#0af"))
rectangle: ap.Rectangle = sprite.graphics.draw_rect(x=50, y=50, width=50, height=50)
...
```Abstract document: [Draw interfaces abstract](https://simon-ritchie.github.io/apysc/en/draw_interfaces_abstract.html)
---
- **Lots of the vector graphics updating interfaces, such as the x, width, rotation, alpha (opacity), ellipse size, scale**
Example code fragments:
```py
...
rectangle.x = ap.Number(100)
...
```Abstract document: [DisplayObject and GraphicsBase classes base properties abstract](https://simon-ritchie.github.io/apysc/en/display_object_and_graphics_base_prop_abstract.html)
---
- **Set each mouse event, such as the click, double click, mouse down, mouse up, mouse over, mouse out, mouse move**

Example code fragments:
```py
...
def on_click(e: ap.MouseEvent, options: dict) -> None:
ap.trace("Rectangle is clicked!")rectangle.click(on_click)
...
```Abstract document: [MouseEvent interfaces abstract](https://simon-ritchie.github.io/apysc/en/mouse_event_abstract.html)
---
- **Use the timer interface and animation**

Example code fragments:
```py
...
def on_timer(e: ap.TimerEvent, options: dict) -> None:
...ap.Timer(on_timer, delay=1000).start()
...
```Documents: [Timer class](https://simon-ritchie.github.io/apysc/en/timer.html)
---
- **Lots of tween animations, including easing options**
[](https://simon-ritchie.github.io/apysc/animation_interfaces_abstract.html)
Example code fragments:
```py
...
rectangle.animation_x(
x=100, duration=1000, easing=ap.Easing.EASE_IN_QUART,
).start()
...
```Abstract document: [Animation interfaces abstract (each animation attribute)](https://simon-ritchie.github.io/apysc/en/animation_interfaces_abstract.html)
---
- **Basic control, like the for loop, if branch instruction, and so on**
Documents:
- [If](https://simon-ritchie.github.io/apysc/en/if.html)
- [Elif](https://simon-ritchie.github.io/apysc/en/elif.html)
- [Else](https://simon-ritchie.github.io/apysc/en/else.html)
- [ForArrayIndices](https://simon-ritchie.github.io/apysc/en/for_array_indices.html)
- [ForArrayValues](https://simon-ritchie.github.io/apysc/en/for_array_values.html)
- [ForDictKeys](https://simon-ritchie.github.io/apysc/en/for_dict_keys.html)
- [ForDictValues](https://simon-ritchie.github.io/apysc/en/for_dict_values.html)
- [ForDictKeysAndValues](https://simon-ritchie.github.io/apysc/en/for_dict_keys_and_values.html)---
For more details, please see the following document:
[What apysc can do in its current implementation](https://simon-ritchie.github.io/apysc/en/what_apysc_can_do.html)
## License
The apysc library is under the MIT License.
The logo image uses the following Creative Commons license font:
- [Pauline Font - by Marcos Boric (2020)](https://www.behance.net/gallery/94972757/Pauline-Font)
- [Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/deed.en)Also, the apysc library depends on the following libraries and assets:
- [jQuery, MIT License](https://github.com/jquery/jquery/blob/main/LICENSE.txt)
- [jQuery Mousewheel](https://github.com/jquery/jquery-mousewheel/blob/main/LICENSE.txt)
- [SVG.js, MIT License](https://github.com/svgdotjs/svg.js/blob/master/LICENSE.txt)
- [Underscore.js, MIT License](https://github.com/jashkenas/underscore/blob/master/LICENSE)
- [Static Typing for Python (Python official backport package)](https://github.com/python/typing)
- [html-minifier, MIT License](https://github.com/Kaumer/html-minifier/blob/master/LICENSE)
- [Material Icons](https://fonts.google.com/icons?selected=Material+Icons:search:), [APACHE LICENSE, VERSION 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)