<commit_before># weblablib

**weblablib** is a library for creating [WebLab-Deusto](https://github.com/weblabdeusto/weblabdeusto/) remote laboratories.

A remote laboratory is a software and hardware system that enables students to access real laboratories through the Internet. 
For example, a student can be learning how to program a robot by writing code in a computer at home and sending it to a remote laboratory, where the student can see how the program behaves in a real environment.

Creating a remote laboratory may imply many layers, such as authentication, authorization, scheduling, etc., so Remote Laboratory Management Systems (RLMS) were created to make the common layers of remote laboatories.
WebLab-Deusto is an Open Source RLMS, and it has multiple ways ((see the docs)[https://weblabdeusto.readthedocs.org]) to create a remote laboratory (in different programming languages, etc.).

In the case of Python, with the popular (Flask)[http://flask.pocoo.org] microframework, **weblablib** is the wrapper used to create *unmanaged labs*. 
*Unmanaged labs* is a term used in WebLab-Deusto to refer laboratories where the authors develop the full stack (server, client, deployment), as opposed to *managed labs*.

If you are familiar with Flask and with Web development, and want to be able to customize everything but not need to implement all the layers of authentication, administration, etc., this library would be very useful.

## Installation

Simply use pip:
```
  pip install weblablib
```

## Simple usage

```python

from flask import Flask
from weblablib import WebLab, current_user, poll

app = Flask(__name__)

weblab = WebLab(app)

@weblab.on_start
def on_start(client_data, server_data, user):
    # ...
    
@weblab.on_dispose
def on_dispose(user):
    # ...
    
if __name__ == '__main__':
    app.run(debug=True)
```

See further examples in the ``examples`` directory.
<commit_msg>Add docs link<commit_after># weblablib

**weblablib** is a library for creating [WebLab-Deusto](https://github.com/weblabdeusto/weblabdeusto/) remote laboratories.

A remote laboratory is a software and hardware system that enables students to access real laboratories through the Internet. 
For example, a student can be learning how to program a robot by writing code in a computer at home and sending it to a remote laboratory, where the student can see how the program behaves in a real environment.

Creating a remote laboratory may imply many layers, such as authentication, authorization, scheduling, etc., so Remote Laboratory Management Systems (RLMS) were created to make the common layers of remote laboatories.
WebLab-Deusto is an Open Source RLMS, and it has multiple ways ((see the docs)[https://weblabdeusto.readthedocs.org]) to create a remote laboratory (in different programming languages, etc.).

In the case of Python, with the popular (Flask)[http://flask.pocoo.org] microframework, **weblablib** is the wrapper used to create *unmanaged labs*. 
*Unmanaged labs* is a term used in WebLab-Deusto to refer laboratories where the authors develop the full stack (server, client, deployment), as opposed to *managed labs*.

If you are familiar with Flask and with Web development, and want to be able to customize everything but not need to implement all the layers of authentication, administration, etc., this library would be very useful.

## Installation

Simply use pip:
```
  pip install weblablib
```

## Simple usage

```python

from flask import Flask
from weblablib import WebLab, current_user, poll

app = Flask(__name__)

weblab = WebLab(app)

@weblab.on_start
def on_start(client_data, server_data, user):
    # ...
    
@weblab.on_dispose
def on_dispose(user):
    # ...
    
if __name__ == '__main__':
    app.run(debug=True)
```

See further examples in the ``examples`` directory.

## Advance usage

Read the docs: https://weblablib.readthedocs.io


{'fraction_non_alphanumeric': 0.07700205338809035, 'fraction_numerical': 0.0, 'mean_word_length': 4.623376623376624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1479642', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1066, 'n_words': 504}