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.11.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.11-py3-none-any.whl (135.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netsblox-0.4.11.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for netsblox-0.4.11.tar.gz
Algorithm Hash digest
SHA256 4595f8d636d0b7f7f739bb641e3698011aa434d2e9d13443c7c35e3b9f2f2b56
MD5 1253415667784d93e8321a4961ebd8e3
BLAKE2b-256 2f230cf20cc483a4d804582b2ab611ea72abdb5f6a6d94d334b3261ec16494ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netsblox-0.4.11-py3-none-any.whl
  • Upload date:
  • Size: 135.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for netsblox-0.4.11-py3-none-any.whl
Algorithm Hash digest
SHA256 05074fdc66e3a3a873c71102dc9a6f4f640cdcfa1315829b2942ffc2c52ebc27
MD5 7b84a51068b2ea24bf4d8dfdcc411c3f
BLAKE2b-256 936f251c3165aaed742ac273be121ac2fc70feeb31ebe32399fc17c2344b7106

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

0.4.12

2 files

This release

0.4.11 This release

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