• This repository has been archived on 31/May/2020
  • Stars
    star
    1,394
  • Rank 33,705 (Top 0.7 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A JavaScript implementation of the Python virtual machine.

Batavia is currently on hiatus

The BeeWare project isn't currently focussing on Batavia development. Python on the Web is still a goal that is important to the BeeWare project; however, the approach that is being used by Batavia needs to be reconsidered. In particular, the emergence of WASM as a viable target for web development opens many options for Python on the web that weren't previously possible.

As a result, we're not dedicating any BeeWare resources to Batavia development, and we we're not encouraging other to contribute to VOC at this time.

If you're interested in exploring future directions for Batavia, please get in touch.

http://beeware.org/project/projects/bridges/batavia/batavia.png

Batavia

py-version pypi-version pypi-status license build-status gitter

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 (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 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).

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.

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

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

For more detailed instructions, see the Python In The Browser 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.

Documentation

Documentation for Batavia can be found on Read The Docs, including:

Contributing

If you'd like to contribute to Batavia development, our guide for first time contributors will help you get started.

If you experience problems with Batavia, log them on GitHub.

Community

Batavia is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

More Repositories

1

toga

A Python native, OS native GUI toolkit.
Python
4,236
star
2

briefcase

Tools to support converting a Python project into a standalone native application.
Python
2,536
star
3

Python-Apple-support

A meta-package for building a version of Python that can be embedded into a macOS, iOS, tvOS or watchOS project.
Makefile
1,088
star
4

voc

A transpiler that converts Python code into Java bytecode
Python
869
star
5

beeware

A meta-package simplifying the installation of the BeeWare suite of tools
832
star
6

beeware.github.io

🐍🐝
JavaScript
530
star
7

paying-the-piper

A project for discussing ways to fund open source development.
342
star
8

Python-iOS-template

A cookiecutter template for creating an iOS project running Python code.
301
star
9

ouroboros

A standalone, pure Python implementation of the Python Standard Library.
Python
292
star
10

rubicon-objc

A bridge interface between Python and Objective-C.
Python
263
star
11

bugjar

A interactive graphical debugger for Python code.
Python
247
star
12

cricket

A GUI tool for running Python test suites.
Python
209
star
13

podium

A Markdown-based native presentation tool
JavaScript
178
star
14

Python-Android-template

A cookiecutter template for creating an Android project running Python code.
159
star
15

colosseum

An implementation of the CSS layout algorithm.
Python
127
star
16

Python-Android-support

A meta-package for building a version of Python that can be embedded into an Android project.
Dockerfile
83
star
17

rubicon-java

A bridge interface between Python and Java.
Python
71
star
18

gbulb

GLib implementation of PEP 3156
Python
64
star
19

duvet

A GUI tool for visualizing coverage data.
Python
53
star
20

vscode-beeware

A Visual Studio Code extension with support for BeeWare development
TypeScript
47
star
21

briefcase-template

A cookiecutter template for a starter Briefcase project.
Python
42
star
22

rubicon

A collection of tools to bridge between Python and other language environments.
Python
40
star
23

yorkshire4

The classic Usborne computer programming books - now in Python!
Python
38
star
24

beekeeper

A Website to manage test and deploy processes
Python
30
star
25

beefore

Tools to run pre-merge checks on a pull request or commit.
Python
28
star
26

Python-macOS-template

A cookiecutter template for creating a standalone macOS project running Python code.
Shell
26
star
27

galley

A GUI tool for reviewing ReST/Sphinx documentation
Python
25
star
28

toga-chart

A matplotlib charting widget for Toga.
Python
24
star
29

briefcase-macOS-app-template

A template for generating macOS app projects with Briefcase
Python
23
star
30

slick

A native web-based client for Slack.
Python
22
star
31

briefcase-iOS-Xcode-template

A template for generating iOS Xcode projects with Briefcase
Objective-C
21
star
32

briefcase-linux-appimage-template

A template for generating Linux AppImage projects with Briefcase
Dockerfile
20
star
33

briefcase-android-gradle-template

A template for generating Android Gradle projects with Briefcase
Python
19
star
34

Python-Linux-support

A meta-package for building a version of Python that can be embedded into a Linux AppImage project.
Makefile
18
star
35

Python-tvOS-template

A cookiecutter template for creating a tvOS project running Python code.
Objective-C
16
star
36

mobile-forge

A tool to manage building cross-platform binary wheels for mobile devices
Python
15
star
37

travertino

A set of constants and utilities for describing user interfaces
Python
15
star
38

briefcase-macOS-Xcode-template

A template for generating an Xcode project for a macOS app using Briefcase
Objective-C
10
star
39

liquid-demo

A demonstration of a "standalone web app", written in Toga.
Python
9
star
40

briefcase-windows-msi-template

A template for generating Windows MSI projects with Briefcase
9
star
41

Python-Windows-template

A cookiecutter template for creating a Windows project running Python code.
Python
7
star
42

Python-OSX-template

A cookiecutter template for creating an OS/X app running Python code.
Shell
7
star
43

trebuchet

A tool to deploy websites.
7
star
44

std-nslog

A shim that redirects stderr/stdout to the Apple System Log (NSLog)
Python
7
star
45

Python-Linux-template

A cookiecutter template for creating a Linux project running Python code.
6
star
46

cpython-android-source-deps

Libraries that are needed to compile CPython for Android
Shell
5
star
47

Python-support-testbed

A testbed app that can be used to validate BeeWare support packages.
Python
4
star
48

briefcase-windows-app-template

A template for generating Windows application projects with Briefcase
4
star
49

Python-Django-template

A cookiecutter template for creating a briefcase-Django project
3
star
50

.github

Community Health files for the BeeWare Project
Python
3
star
51

cpython-apple-source-deps

A meta-project for building the binary packages for iOS, tvOS and watchOS that a CPython build requires
Makefile
3
star
52

briefcase-windows-VisualStudio-template

A template for generating Visual Studio projects for building Windows apps with Briefcase
C++
3
star
53

cookiecutter-website

A cookiecutter template for new pybee project websites.
CSS
2
star
54

legless-lizard

A setuptools mock of pythonnet.
Python
2
star
55

briefcase-linux-system-template

A template for generating Linux system packages with Briefcase
C
2
star
56

briefcase-linux-flatpak-template

A template for generating Linux Flatpak projects with Briefcase.
C
2
star
57

cpython-macOS-source-deps

A meta-project for building the binary packages for macOS that a CPython build requires
Makefile
2
star
58

pytest-briefcase

A pytest plugin for running tests of a Briefcase project.
Python
2
star
59

comb

A repository of BeeKeeper task configurations.
2
star
60

briefcase-linux-deb-template

A template for generating Linux .deb projects with Briefcase
C
1
star
61

lektor-gravatar

A Lektor plugin for generating gravatars
Python
1
star
62

skep

A proxy for finding and serving the latest Briefcase support packages
Python
1
star
63

setuptools_dynamic_dependencies

A setuptools plugin that allows for dependencies that are dependent on the package's version number.
Python
1
star
64

briefcase-web-static-template

A template for generating static web projects with Briefcase.
HTML
1
star
65

actions

Reusable Github Action templates for BeeWare
1
star