Skip to main content

Python compiler for the Neo3 Virtual Machine

Overview

The neo3-boa compiler is a tool for compiling Python files to the .nef and .manisfest.json formats for usage in the Neo Virtual Machine which is used to execute contracts on the Neo Blockchain.

What it currently does…

  • Compiles a subset of the Python language to the .nef and .manisfest.json format for use in the Neo Virtual Machine

  • Works for Python 3.7+

  • Logs compiler errors and warnings

  • Logs when the main method is analysed

  • Logs method inclusions in .abi file to work with Neo Debuggers.

  • Converts Functions

  • Converts Local Variable Declarations and Assignments

foo: int = 42
bar = foo
  • Converts Number Arithmetic Operations (+, -, *, //, %)

  • Converts Numeric Arithmetic Augmented assignment Operators (+=, -=, *=, //=, %=)

  • Converts Relational Operations (==, !=, <, <=, >, >=)

  • Converts Boolean Logic Operations and chained comparisons (and, or, not)

  • Converts Tuple type (get and set operations)

  • Converts List type

  • Converts While Statement

foo = 0
while condition:
    foo = foo + 2
  • Converts If, elif, else Statements

if condition1:
    foo = 0
elif condition2:
    foo = 1
else:
    bar = 2
  • Converts For Statement

for x in (1, 2, 3):
    ...
  • Converts Function Call

def Main(num: int):
    a = foo(num)
    ...

def foo(num: int) -> int:
    ...
  • Converts len() for str, tuple and list

  • Converts Multiple Expressions in the same line (i = i + h; a = 1; b = 3 + a; count = 0)

  • Converts String Slicing (x = 'example'[2:4], x = 'example'[:4], x = 'example'[4:], x = 'example'[:])

What it will do…

  • continue, break and pass

  • Convert Numeric Arithmetic Augmented assignment Operators (/=)

  • Convert Number Arithmetic Operations (/, **)

  • Convert Relational Operations (is, is not)

  • Convert String Slicing (x = 'example'[2:4:2], x = 'example'[::2])

Metadata

Release files for neo3-boa 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neo3-boa 0.8.1
File Size Uploaded
neo3-boa-0.8.1.tar.gz 215.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for neo3-boa 0.8.1
File Interpreter ABI Platform
neo3_boa-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 627.7 kB

Release files / neo3-boa-0.8.1.tar.gz

Download URL neo3-boa-0.8.1.tar.gz
Size 215.3 kB
Tags Source
SHA-256 checksum
How to use checksums
db60707024f021309cc18d026d9e59294c283317e00a6c7770c419c945f02c57
BLAKE2b-256 checksum
How to use checksums
985c5de5529b6a60904b77a0686f68679b762bf37fdfd1d2d0324a9a9ab8c259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.0

Release files / neo3_boa-0.8.1-py3-none-any.whl

Download URL neo3_boa-0.8.1-py3-none-any.whl
Size 412.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cb8cf4d9174f9774a84ba8309a27a174d311cb522b7453406009b69ccf55b7c
BLAKE2b-256 checksum
How to use checksums
c9031ba791507bc97cdf3abed07e352c096e64e67ad3be588bc26d1f7bdebe05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.0

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.11.3

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.3.0

2 release files

0.0.3

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page