Skip to main content

A python client for accessing NetsBlox

Project description

NetsBlox-python

NetsBlox-python is a wrapper for accessing 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.

Installation

NetsBlox-python is available as a pip package called netsblox, so you can install it with the following:

pip install 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.

Example Usage

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

import netsblox

client = netsblox.Client() # create a client to access NetsBlox
co2 = client.get_service('MaunaLoaCO2Data')
data = co2.get_co2_trend(2000, 2010)
print(data)

Naming Conventions

As seen in the example above, services are referenced by name as a string. These are identical to the service names shown in the NetsBlox services documentation. The RPCs (functions) in each service, however, are methods on the service object. NetsBlox uses cammelCase names, while python uses snake_case. If you see a function in the NetsBlox documentation like performSomeAction, you just need to write the equivalent snake case name perform_some_action.

Project details


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.2.4.tar.gz (77.3 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.2.4-py2.py3-none-any.whl (85.5 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: netsblox-0.2.4.tar.gz
  • Upload date:
  • Size: 77.3 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.2.4.tar.gz
Algorithm Hash digest
SHA256 5022f454cc6b362a1a23de24fd338970a03f481204ecbb0d21e741d5d16885ca
MD5 74c43ca57a1338fda6ee21307027e6b2
BLAKE2b-256 3baf096a7cc82940c0a96b557d5932ec6f88481d3c56c3419ed1171af2564ab9

See more details on using hashes here.

File details

Details for the file netsblox-0.2.4-py2.py3-none-any.whl.

File metadata

  • Download URL: netsblox-0.2.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 85.5 kB
  • Tags: Python 2, 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.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0a1451ae866c080ffa73f4aa0171c7b1ba17b93b61529ec0eb7e94614b0d0d76
MD5 3be5262df680a43cee72555a882006cd
BLAKE2b-256 eb13c0f7ddd46881044c47c7fea1711c95698a7dff6e1a55f72c837ed836d5d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page