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.13.tar.gz (128.6 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.13-py3-none-any.whl (130.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netsblox-0.4.13.tar.gz
  • Upload date:
  • Size: 128.6 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.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for netsblox-0.4.13.tar.gz
Algorithm Hash digest
SHA256 da5b24be7377b7cd479b3ac5481279fdc040a5d6beae3ed41082f690370a5102
MD5 cbed462ca06e47cb99eff54bf45bd34b
BLAKE2b-256 8bcf8663516ccca0f273ef75757553416e9f29d3e25046294b9fd37979cc14ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netsblox-0.4.13-py3-none-any.whl
  • Upload date:
  • Size: 130.3 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.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for netsblox-0.4.13-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ad3e5319ab654e2a5a68f85eb9cbf88952803289d9ba8fbcca939e3f115d65
MD5 e3f8c1624471ef60384a9a837ffb6bbf
BLAKE2b-256 2a7cf30950826e86ec9f290bab1b143312a271536bfa8b97c587d1d6d3b128d9

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

This release

0.4.13 This release

2 files

0.4.12

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