batavia

A JavaScript implementation of the Python virtual machine.

  • 所有者: beeware/batavia
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

.. image:: http://beeware.org/project/projects/bridges/batavia/batavia.png
:width: 72px
:target: https://beeware.org/batavia

=======
Batavia
=======, py-version, pypi-version, pypi-status, license, build-status, gitter, .., py-version, image:: https://img.shields.io/pypi/pyversions/batavia.svg
:target: https://pypi.python.org/pypi/batavia
.., pypi-version, image:: https://img.shields.io/pypi/v/batavia.svg
:target: https://pypi.python.org/pypi/batavia
.., pypi-status, image:: https://img.shields.io/pypi/status/batavia.svg
:target: https://pypi.python.org/pypi/batavia
.., license, image:: https://img.shields.io/pypi/l/batavia.svg
:target: https://github.com/beeware/batavia/blob/master/LICENSE
.., build-status, image:: https://beekeeper.beeware.org/projects/beeware/batavia/shield
:target: https://beekeeper.beeware.org/projects/beeware/batavia
.., gitter, image:: https://badges.gitter.im/beeware/general.svg
:target: https://gitter.im/beeware/general

Batavia is an early alpha project. If it breaks, you get to keep all the shiny pieces.

Batavia is an implementation of the Python virtual machine, written in
JavaScript. With Batavia, you can run Python bytecode in your browser.

It honors Python 3.5+ syntax and conventions, and allows you to
reference objects and classes defined natively in JavaScript.

Quick Start

Prerequisites


Batavia requires a Python 3.5, 3.6, or 3.7 installation, and a virtualenv to
run it all in.

You also need to have a recent install of `Node.js <https://nodejs.org>`_
(from the 10.x LTR series), and a current version of npm. If
your version of npm is outdated, you can update it using the command::

$ npm install npm@latest -g

Check the `Setting up your environment
<http://beeware.org/contributing/how/first-time/setup/>`_ for configuration help.


Downloading and Installing
  1. Clone the code repositories
    ::

$ mkdir beeware
$ cd beeware
$ git clone https://github.com/beeware/batavia

  1. Setup a virtualenv:

(for other environments, see Getting Started <https://batavia.readthedocs.io/en/latest/tutorial/tutorial-0.html>_).

Linux/Unix/Mac

Type the following commands in your terminal ::

$ python3 --version
$ python3 -m venv venv
$ . venv/bin/activate
$ cd batavia
$ pip install -e .

Windows

Type the following commands in your terminal ::

> py -3 -m venv venv
> venv\Scripts\activate
> cd batavia
> pip install -e .

Windows (with only conda installed)

Type in the following commands in your terminal ::

pip install virtualenvwrapper-win
mkvirtualenv venv
workon venv
cd batavia
pip install -e .

  1. Install Node.js <https://nodejs.org>_.

You must have a recent version of Node; we do our testing using v10.x. Once
you've installed Node, you can use it to install the JavaScript dependencies
and compile the Batavia library::

$ npm install

  1. Compile the Batavia library and bundle its dependencies

Run the following command in the terminal ::

$ npm run build

For more detailed setup instructions, see the Getting Started tutorial <https://batavia.readthedocs.io/en/latest/tutorial/tutorial-0.html>_

Running Batavia in the browser


After you have setup the local installation of Batavia, you can now run Python in the browser: ::

$ cd testserver
$ pip install -r requirements.txt
$ python manage.py runserver

then open a web browser at `http://localhost:8000 <http://localhost:8000>`_

For more detailed instructions, see the `Python In The Browser
<http://batavia.readthedocs.io/en/latest/tutorial/tutorial-1.html>`_ guide.


Running Batavia in the terminal

If you want to run some Python code from a file in the terminal, you can also run Batavia on Node: ::

$ npm run python /path/to/python/file.py

This will should run the Python file and show output on the terminal.

For more details see Running Python code using Batavia from the command line <http://batavia.readthedocs.io/en/latest/tutorial/tutorial-2.html>_.

Documentation

Documentation for Batavia <http://batavia.readthedocs.io/en/latest/>_ can be found on Read The Docs <https://readthedocs.org>_, including:

  • Getting Started <https://batavia.readthedocs.io/en/latest/tutorial/index.html>__
  • So, why is it called "Batavia"? <https://batavia.readthedocs.io/en/latest/background/faq.html#why-batavia>_
  • More Frequently Asked Questions <https://batavia.readthedocs.io/en/latest/background/faq.html>_.

Contributing

If you'd like to contribute to Batavia development, our guide for first time contributors <http://beeware.org/contributing/how/first-time/>_ will help you get started.

If you experience problems with Batavia, log them on GitHub <https://github.com/beeware/batavia/issues>_.

Community

Batavia is part of the BeeWare suite <http://beeware.org>_. You can talk to the community through:

  • @pybeeware on Twitter <https://twitter.com/pybeeware>_

  • The beeware/general <https://gitter.im/beeware/general>_ channel on Gitter.

We foster a welcoming and respectful community as described in our
BeeWare Community Code of Conduct <http://beeware.org/community/behavior/>_.

主要指標

概覽
名稱與所有者beeware/batavia
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證Other
所有者活动
創建於2015-08-09 01:40:34
推送於2020-05-31 05:55:55
最后一次提交2020-05-31 13:54:17
發布數1
最新版本名稱v0.0.1 (發布於 )
第一版名稱v0.0.1 (發布於 )
用户参与
星數1.4k
關注者數86
派生數421
提交數2.2k
已啟用問題?
問題數146
打開的問題數50
拉請求數564
打開的拉請求數2
關閉的拉請求數126
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?