Giter VIP home page Giter VIP logo

tangym / onem2m-jupyter-notebooks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ankraft/onem2m-jupyter-notebooks

0.0 0.0 0.0 2.64 MB

A couple of Jupyter notebooks to explain how to create, access and manage oneM2M resources

License: BSD 3-Clause "New" or "Revised" License

Shell 0.03% JavaScript 5.48% Python 79.02% ActionScript 0.01% CSS 4.93% HTML 0.96% Jupyter Notebook 8.94% Dockerfile 0.05% AngelScript 0.59%

onem2m-jupyter-notebooks's Introduction

oneM2M Jupyter Notebooks

This repository contains a number of Jupyter Notebooks that give a practical introduction to programmatically interacting with a oneM2M CSE. The notebooks explain how to access a CSE, add and update resources, and more.

Binder Twitter

images/jupyter-lab.jpg

Installation and Configuration

oneM2M Notebooks and Python Packages

  • Download or clone this repository to a local directory.

  • Install the necessary Python packages with the following command. You might want to consider to use a virtual environment, such as pyenv to keep your system installation clean.

      pip3 install -r requirements.txt
    

Configuration

Note
Changing these configurations is only necessary when you run your own CSE and Notification Server instead the one provided with the notebooks.

Please change the configuration in the file config.py according to your setup.

CSE Configuration

  • cseRN : The resource name of the CSE.
  • host : The URL of the CSE we want to connect to in the examples in the notebooks.
  • defaultOriginator : Originator ID to access the CSE.
  • upperTester : The full URL to access the CSE's Upper Tester interface , or None if not defined.

Notification Server Configuration

  • notificationURLBase : The base URL for the Notification Server.
  • notificationPort : The port for Notification Server.

Proxy Configuration

(Only necessary if your CSE / Notification Server can only be reached through a proxy server)

  • httpProxy : URL of your local network's http proxy server, or None.
  • httpsProxy : URL of your local network's https proxy, or None.

oneM2M CSE

The notebooks have been tested with the ACME oneM2M CSE.

These notebooks include the CSE runtime in the directory tools/ACME. It needs to be started via the separate notebook start-cse.ipynb

Notification Server

The Notification server is a separate notebook start-notificationServer.ipynb that implements a simple notification server. The executable script can be found here: tools/NotificationServer/NotificationServer.py .

Running the Notebooks

The local installation of Jupyter Notebooks can be run with one of the following commands:

  • Running with Jupyter Labs (preferred):

      jupyter lab --NotebookApp.token='' __START__.ipynb
    
  • Running with Jupyter Notebook (classic):

      jupyter notebook --NotebookApp.token='' __START__.ipynb
    

A web page with the start-up notebook opens from which you can select the exercises.

Some browsers are not able to connect to the kernel service. See the following Troubleshooting section.

Troubleshooting

When you open a notebook in your web browser you might get an error message about a "failed connection". In this case you might try another browser. When starting the Jupyter Notebook server you see a message in the console with a URL that you can paste in a browser, for example: http://localhost:8888/?token=<a long token> .

If you run the Jupyter Notebook server without authentication token (see the --NotebookApp.token option above), just use, for example http://localhost:8888 .

If you enabled the authentication token (which is the default for Jupyter) then you must use this URL including the token, because this authenticates the connection to the local Jupiter Notebook server.

Working with the Exercises

You can run the notebooks in any order. Each notebook has an init cell that initializes the notebook and creates the oneM2M resource structure for the exercises. Please execute this code cell when starting with a notebook and before executing any of the other code cells.

You may always execute the first code cell of a notebook again to re-initialize the resource tree.

CSE & Notification Server Notebooks

oneM2M Notebooks & Exercises

Running online with Binder

The oneM2M Jupyter notebooks can be run online with binder.

License

These Notebooks are available under the BSD 3-Clause License.

onem2m-jupyter-notebooks's People

Contributors

ankraft avatar bkiran6398 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.