Skip to main content

NetsBlox-python

NetsBlox is a block-based programming environment which has a focus on distributed computing and internet connectivity. One of the core features of NetsBlox are remote procedure calls (RPCs), which connect to the NetsBlox server and provide access to online resources such as databases, GoogleMaps, online translation, wireless robotics, mobile phone sensors/control, and more.

NetsBlox-python is an interface for accessing all NetsBlox services from within python. You can import this package in any python program that has internet access and begin calling RPCs and sending/receiving messages!

For more information about NetsBlox and the available services, see the official NetsBlox Documentation.

Example Usage

Here's a short example to see how you can access the MaunaLoaCO2Data service from python.

import netsblox
nb = netsblox.Client() # create a client to access NetsBlox

data = nb.mauna_loa_co2_data.get_co2_trend(2000, 2010)
print(data)

Turtle IDE

NetsBlox-python, while useful on its own for accessing NetsBlox services, has a side goal of helping transition students from block-based languages like NetsBlox and Snap! into textual languages like python. Because of this, NetsBlox-python comes with a custom wrapper for the popular turtle environment, as well as an IDE for creating python projects in a way that is still structured like a NetsBlox/Snap! project in both appearnance and concurrency model (closest approximation).

These features are only activated when explicitly called, leaving the default behavior as a normal python package for accessing NetsBlox services.

To launch the IDE, you can simply run the NetsBlox-python pypi package as a module:

python -m netsblox

Installation

NetsBlox-python is available as a pip package called netsblox (keep in mind that NetsBlox-python is a python3 package, so you may need to use pip3 if your pip still points to the python2 version).

pip install netsblox

This will pull all of the core python dependencies for using NetsBlox services, but some additional setup is needed for the turtle environment and IDE to work.

Windows

No additional install dependencies

Mac

brew install python-tk

Linux

sudo apt install python3-pil python3-pil.imagetk
sudo apt install idle3

Structured Data

Due to the limited type primitives in Snap!, one NetsBlox typing convention is "structured data", which is really just a list of lists (pairs) denoting (unique string) keys and values. In the python interface, this is replaced by dict for both input and return value. The python interface will automatically convert input dict values into lists of lists, and convert lists of lists return values into dict (where appropriate).

Naming Conventions

The python names for services, functions, and input parameters are identical to those in the official NetsBlox documentation, except that they are converted into snake case to by more pythonic. Of course, any modern editor will have some form of intellisense built in, so in practice this is a non-issue.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netsblox-0.4.12.tar.gz (124.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netsblox-0.4.12-py3-none-any.whl (130.2 kB view details)

Uploaded Python 3

File details

Details for the file netsblox-0.4.12.tar.gz.

File metadata

  • Download URL: netsblox-0.4.12.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for netsblox-0.4.12.tar.gz
Algorithm Hash digest
SHA256 b6c6b1c3c659a6a9d47ec024df44b83a649ce215cdf0aee61155629963d2f4dd
MD5 afccb738ee52cc0f8dbcfffa002b39d3
BLAKE2b-256 8239db7b7e5f692e8f6a1cfe8290b43aeff67d7224c2099a5756554aa896275f

See more details on using hashes here.

File details

Details for the file netsblox-0.4.12-py3-none-any.whl.

File metadata

  • Download URL: netsblox-0.4.12-py3-none-any.whl
  • Upload date:
  • Size: 130.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for netsblox-0.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 f33d21666d0934b9541a6e9be63acad0e235dbb1ee77a380e750dc22021c25c0
MD5 712613f84753b97ef182f43bf54dbaf4
BLAKE2b-256 2e20db41a19c90742f9de442a01c5ca5ae53932cc34e2508630699d85f150403

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.20

2 files

0.6.19

2 files

0.6.18

2 files

0.6.17

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

1 file

0.6.7

1 file

0.6.6

1 file

0.6.5

1 file

0.6.4

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.5.17

1 file

0.5.16

1 file

0.5.15

2 files

0.5.14

2 files

0.5.13

2 files

0.5.12

2 files

0.5.11

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.17

2 files

0.4.16

2 files

0.4.15

2 files

0.4.14

2 files

0.4.13

2 files

This release

0.4.12 This release

2 files

0.4.11

2 files

0.4.10

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 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