Skip to main content

dapla-ipython-kernels

Python module for use within Jupyter notebooks. It contains kernel extensions for integrating with Apache Spark, Google Cloud Storage and custom dapla services.

PyPI version Status License

Getting Started

Install the module from pip:

# pip
pip install dapla-ipython-kernels

Now the module is ready to use with a single import:

import dapla as dp

This module is targeted to python kernels in Jupyter, but it may work in any IPython environment. It also depends on a number of custom services, e.g. the custom auth service

To test, simply create any Pandas dataframe. This can be stored in Google Cloud Storage at a specific path:

import pandas as pd
import dapla as dp

data = {
    'apples': [3, 2, 0, 1], 
    'oranges': [0, 3, 7, 2]
}
# Create pandas DataFrame
purchases = pd.DataFrame(data, index=['June', 'Robert', 'Lily', 'David'])

# Write pandas DataFrame to parquet
dp.write_pandas(purchases, '/testfolder/python/purchases', valuation='INTERNAL', state= 'INPUT')

Conversely, parquet files can be read from a path directly into a pandas DataFrame.

import dapla as dp
# Read path into pandas dataframe 
purchases = dp.read_pandas('/testfolder/python/purchases')

Other functions

Since the python module integrates with Google Cloud Storage and custom dapla services, some other functions exist as well:

import dapla as dp

# List path by prefix
dp.show('/testfolder/python')
Path Timestamp
/testfolder/python/purchases 1593120298095
/testfolder/python/other 1593157667793
import dapla as dp

# Show file details
dp.details('/testfolder/python/purchases')
Size Name
2908 42331105444c9ca0ce049ef6de7160.parquet

See also the example notebook written for Jupyter.

Deploy to SSB jupyter

Release version pypi

Make sure you have a clean master branch.
run make bump-version-patch - this will update version and commit to git.
run git push --tags origin master - important to have --tags to make it auto deploy to pypi

If everything was ok we should see a new release her: https://pypi.org/project/ssb-ipython-kernels/

Update jupyter image on staging

For now, we have to delete the running jupyer hub instance to make it use this new config

Release files for ssb-ipython-kernels 0.3.3

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

Source distribution (sdist)

Source distribution for ssb-ipython-kernels 0.3.3
File Size Uploaded
ssb-ipython-kernels-0.3.3.tar.gz 25.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssb-ipython-kernels 0.3.3
File Interpreter ABI Platform
ssb_ipython_kernels-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size:54.7 kB

Release files / ssb-ipython-kernels-0.3.3.tar.gz

Download URL ssb-ipython-kernels-0.3.3.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5fde0db08be21e8082cd70eaeeb9a832db54e9ef77467f2874bb12ee5f97be25
BLAKE2b-256 checksum
How to use checksums
c1500dbd3944013356007b66c31ca1102cd26dbe060e7fd02b7699fa4bd1146d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release files / ssb_ipython_kernels-0.3.3-py3-none-any.whl

Download URL ssb_ipython_kernels-0.3.3-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15e84d565a0eeaaddef09cd28f54fe4fac92f3aba791aecf41b2991aa1153c83
BLAKE2b-256 checksum
How to use checksums
13f7c67b79f7877844be3ec9b637cef1b2f64dbf1466c6fecbd12be9d76bab9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.32

2 release files

0.2.31

2 release files

0.2.30

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.27

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.24

2 release files

0.2.22

2 release files

0.2.20

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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