Skip to main content
# hydra-notebooks

Jupyter notebooks integration for Django.
Features:
- Expose and API to handle notebooks,
- Import as modules
- Execute by notebook
- Embedd to Django-extensions shell plus

### Configuration

Jupyter configuration has to be add to the site directory, aside the ```settings.py```

### Usage

#### Importing and using notebooks

Assume, we have a notebook called ```my_notebook``` with the following cell:

```python
class SampleClass(object):

def sample_method(self):
print('execute sample_method')
pass

def sample_method_with_output(self):
print('execute sample_method_with_output')
return 'output'

def sample_method_with_inoutput(self, param, *args, **kwargs):
print('execute sample_method_with_inoutput(%s, %s, %s)' % (param, args, kwargs))
return 'output'

def __str__(self):
return 'sample_class'
```

```python
# To use the module capabilities
import hydra_notebook

import notebooks.my_notebook as mynb

new_instance = mynb.SampleClass()

new_instance.sample_method_with_output()

```

As result:

```
execute sample_method_with_output
```

#### Executing notebooks

```python
import hydra_notebook
import os

with hydra_notebook.NotebookExecutor(path=os.path.join('.', 'notebooks'), fullname='demo_notebook') as e:
e()
```

#### Displaying notebooks as HTML5 page

```/notebook/index```: List all notebooks

```/notebook/detail/<notebook_name>```: Show a notebook

#### Displaying notebooks as JSON

```/notebook/```: List all notebooks

```/notebook/<notebook_name>/```: Show a notebook

```/notebook/<notebook_name>/execute```: Execute a notebook

Metadata

Release files for hydra-notebook 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydra-notebook 1.0.0
File Size Uploaded Provenance
hydra-notebook-1.0.0.tar.gz 16.4 kB Without provenance Details

Release files / hydra-notebook-1.0.0.tar.gz

Download URL hydra-notebook-1.0.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0085717b350d1eb1d60fc586521f9e59c423f71c7935ac1bdc1b648416c240d8
BLAKE2b-256 checksum
How to use checksums
fb4dce087fd04c1fbc6f8b5457ccf28b16b1967f91d2886618c5261921172ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hydra-notebook 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

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