# apysc
[![Deploy to PyPI](https://github.com/simon-ritchie/apysc/actions/workflows/deploy_to_pypi.yml/badge.svg)](https://github.com/simon-ritchie/apysc/actions/workflows/deploy_to_pypi.yml)
[![PyPI version](https://badge.fury.io/py/apysc.svg)](https://badge.fury.io/py/apysc)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/simon-ritchie/apysc/blob/main/LICENSE)
![](https://byob.yarr.is/simon-ritchie/apysc/pytest_coverage)
![logo](https://github.com/simon-ritchie/apysc/blob/main/assets/logo_v1/logo_small_v1.png)
apysc is the Python frontend library to create HTML and js files, that has ActionScript 3 (as3)-like interface.
Notes: Currently developing and only works partially.
## Why apysc
- In some cases, when you want to do the front-end works yourself, such as customized data visualization on the web in a Python project or UI creation in a Django project, it's potentially easier not to have to write JavaScript or TypeScript.
- If you can write the front end using only Python, no HTML, CSS, JavaScript, and TypeScript, you can reduce the cost of switching languages.
- It simplifies CI since you only need to maintain only the Python lint and tests (e.g., mypy, flake8, and pytest).
## Supported Python Version
Python 3.6 or later.
## Installing
```
$ pip install apysc
```
## What apysc can do in its current implementation
- **Save HTML or use it on the Jupyter notebook, JupyterLab, and Google Colaboratory!**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/jupyterlab_interface.png)
Documents: [save_overall_html interface](https://simon-ritchie.github.io/apysc/save_overall_html.html), [display_on_jupyter interface](https://simon-ritchie.github.io/apysc/display_on_jupyter.html), [display_on_colaboratory interface](https://simon-ritchie.github.io/apysc/display_on_colaboratory.html)
- **Draw the many types of vector graphics**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/vector_graphics_samples.png)
Documents: [begin_fill interface](https://simon-ritchie.github.io/apysc/graphics_begin_fill.html), [line_style interface](https://simon-ritchie.github.io/apysc/graphics_line_style.html), [draw_rect interface](https://simon-ritchie.github.io/apysc/graphics_draw_rect.html), [draw_round_rect interface](https://simon-ritchie.github.io/apysc/graphics_draw_round_rect.html), [draw_circle interface](https://simon-ritchie.github.io/apysc/graphics_draw_circle.html), [draw_ellipse interfac](https://simon-ritchie.github.io/apysc/graphics_draw_ellipse.html), [move_to and line_to interfaces](https://simon-ritchie.github.io/apysc/graphics_move_to_and_line_to.html), [draw_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_line.html), [draw_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dotted_line.html), [draw_dashed_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dashed_line.html), [draw_round_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_round_dotted_line.html), [draw_dash_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dash_dotted_line.html), [draw_dash_dotted_line interface](https://simon-ritchie.github.io/apysc/graphics_draw_dash_dotted_line.html), [draw_polygon interface](https://simon-ritchie.github.io/apysc/graphics_draw_polygon.html)
- **Lots of the vector graphics updating interfaces, such as the `x`, `width`, `rotation`, `alpha (opacity)`, `ellipse size`, `scale`**
Document: [x and y interfaces](https://simon-ritchie.github.io/apysc/display_object_x_and_y.html), [visible interface](https://simon-ritchie.github.io/apysc/display_object_visible.html), [get_css and set_css interfaces](https://simon-ritchie.github.io/apysc/display_object_get_and_set_css.html), [rotation_around_center interface](https://simon-ritchie.github.io/apysc/graphics_base_rotation_around_center.html), [rotation_around_point interfaces](https://simon-ritchie.github.io/apysc/graphics_base_rotation_around_point.html), [scale_x_from_center and scale_y_from_center interfaces](https://simon-ritchie.github.io/apysc/graphics_base_scale_from_center.html), [get_scale_from_point and set_scale_from_point interfaces](https://simon-ritchie.github.io/apysc/graphics_base_scale_from_point.html), [flip_x and flip_y interfaces](https://simon-ritchie.github.io/apysc/graphics_base_flip_interfaces.html), [skew_x and skew_y interfaces](https://simon-ritchie.github.io/apysc/graphics_base_skew.html)
- **Set each mouse event, such as the click, double click, mouse down, mouse up, mouse over, mouse out, mouse move**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/mouse_move.gif)
Documents: [Click interface](https://simon-ritchie.github.io/apysc/click.html), [Double click interface](https://simon-ritchie.github.io/apysc/dblclick.html), [Mousedown and mouseup interfaces](https://simon-ritchie.github.io/apysc/mousedown_and_mouseup.html), [Mouseover and mouseout interfaces](https://simon-ritchie.github.io/apysc/mouseover_and_mouseout.html), [Mousemove interface](https://simon-ritchie.github.io/apysc/mousemove.html)
- **Use the timer interface and animation**
![](https://github.com/simon-ritchie/apysc/blob/main/assets/rotation_and_alpha_animation.gif)
Documents: [Timer](https://simon-ritchie.github.io/apysc/timer.html)
- Basic control, like the for loop, if branch instruction, and so on
Documents: [If](https://simon-ritchie.github.io/apysc/if.html), [Elif](https://simon-ritchie.github.io/apysc/elif.html), [Else](https://simon-ritchie.github.io/apysc/else.html), [For](https://simon-ritchie.github.io/apysc/for.html)
For more details, please see the following document:
[What apysc can do in its current implementation](https://simon-ritchie.github.io/apysc/what_apysc_can_do.html)
## How to start
Please see [apysc documentation](https://simon-ritchie.github.io/apysc/index.html) and [quick start guide](https://simon-ritchie.github.io/apysc/quick_start.html) page.
<a href="https://simon-ritchie.github.io/apysc/index.html"><img src="https://github.com/simon-ritchie/apysc/blob/main/assets/document_index_screenshot.png"></a>
## License
This library is released under the MIT License.
The logo image is using followed 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:
- 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
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共234个文件
py:221个
js:4个
txt:4个
资源分类:Python库 所属语言:Python 资源全名:apysc-0.53.15.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | apysc-0.53.15.tar.gz (234个子文件)
setup.cfg 38B
MANIFEST.in 24B
svg.min.js 129KB
jquery.min.js 87KB
underscore.min.js 19KB
jquery.mousewheel.min.js 3KB
README.md 7KB
PKG-INFO 665B
PKG-INFO 665B
array.py 39KB
number_value_interface.py 35KB
string.py 24KB
graphics.py 22KB
dictionary.py 20KB
assertion.py 19KB
exporter.py 19KB
line_style_interface.py 18KB
any_value.py 18KB
timer.py 16KB
expression_data_util.py 14KB
boolean.py 14KB
custom_event_interface.py 11KB
debug_mode.py 11KB
child_interface.py 10KB
handler_circular_calling_util.py 10KB
point2d.py 9KB
graphics_expression.py 9KB
html_util.py 8KB
rotation_around_point_interface.py 8KB
revert_interface.py 8KB
stage.py 8KB
animation_base.py 8KB
line_base.py 8KB
width_and_height_interfaces_for_ellipse.py 7KB
mouse_event.py 7KB
_for.py 7KB
display_validation.py 7KB
handler.py 7KB
__init__.py 7KB
event_handler_scope.py 6KB
scale_y_from_center_interface.py 6KB
scale_x_from_center_interface.py 6KB
rectangle.py 6KB
animation_rotation_around_point.py 6KB
rotation_around_center_interface.py 6KB
css_interface.py 6KB
animation_scale_x_from_point.py 5KB
animation_scale_y_from_point.py 5KB
line_round_dot_setting_interface.py 5KB
scale_x_from_point_interface.py 5KB
line_dash_dot_setting_interface.py 5KB
fill_alpha_interface.py 5KB
scale_y_from_point_interface.py 5KB
points_2d_interface.py 5KB
begin_fill_interface.py 5KB
mouse_event_interface_base.py 5KB
line_color_interface.py 5KB
file_util.py 5KB
line_thickness_interface.py 5KB
ellipse_width_interface.py 5KB
ellipse_height_interface.py 5KB
line_alpha_interface.py 5KB
radius_interface.py 5KB
skew_y_interface.py 5KB
line.py 5KB
skew_x_interface.py 5KB
easing.py 5KB
animation_rotation_around_center.py 5KB
fill_color_interface.py 5KB
height_interface.py 5KB
line_dash_setting_interface.py 5KB
width_interface.py 5KB
expression_variables_util.py 5KB
circle.py 5KB
animation_scale_y_from_center.py 5KB
animation_scale_x_from_center.py 5KB
mouse_move_interface.py 5KB
value_util.py 5KB
int.py 4KB
mouse_down_interface.py 4KB
line_dot_setting_interface.py 4KB
flip_y_interface.py 4KB
flip_x_interface.py 4KB
x_interface.py 4KB
y_interface.py 4KB
mouse_over_interface.py 4KB
mouse_out_interface.py 4KB
mouse_up_interface.py 4KB
if_base.py 4KB
color_util.py 4KB
click_interface.py 4KB
ellipse.py 4KB
line_joints_interface.py 4KB
sprite.py 4KB
double_click_interface.py 4KB
visible_interface.py 4KB
line_cap_interface.py 4KB
cy_interface.py 4KB
animation_skew_y.py 4KB
animation_skew_x.py 4KB
共 234 条
- 1
- 2
- 3
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功