Skip to main content

Library for working with Skills Network

Project description

Skills Network Python Library

A python library for working with Skills Network.

Installation

JupyterLite Installation

pip install skillsnetwork

Regular Installation (JupyterLab, CLI, etc.)

pip install skillsnetwork[regular]

Usage

JupyterLab / JupyterLite on Skills Network Labs

The skillsnetwork package provides a unified interface for reading/downloading files in JupyterLab and JupyterLite.

Reading a file

content = await skillsnetwork.read("https://example.com/myfile")

Downloading a file

await skillsnetwork.download("https://example.com/myfile", filename=filename)
with open(filename, "r") as f:
    content = f.read()

Preparing a dataset (downloading, unzipping, and unarchiving)

await skillsnetwork.prepare("https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-ML0187EN-SkillsNetwork/labs/module%203/images/images.tar.gz")

Example migration from old method

Old methods
Naively downloading and unzipping/untarring (runs very slowly on Skills Network Labs):
! wget https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-ML0187EN-SkillsNetwork/labs/module%203/images/images.tar.gz
print("Images dataset downloaded!")
!tar -xf images.tar.gz
print("Images dataset unzipped!")
Old workaround for better performance (this is confusing to users)
! wget https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-ML0187EN-SkillsNetwork/labs/module%203/images/images.tar.gz
print("Images dataset downloaded!")
!tar -xf images.tar.gz -C /tmp
!rm -rf images
!ln -sf /tmp/images/ .
print("Images dataset unzipped!")
New and improved method
await skillsnetwork.prepare("https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBM-ML0187EN-SkillsNetwork/labs/module%203/images/images.tar.gz")

CV Studio

Environment Variables

  • CV_STUDIO_TOKEN
  • CV_STUDIO_BASE_URL
  • IBMCLOUD_API_KEY

Python Code example

from datetime import datetime
import skillsnetwork.cvstudio
cvstudio = skillsnetwork.cvstudio.CVStudio('token')

cvstudio.report(started=datetime.now(), completed=datetime.now())

cvstudio.report(url="http://vision.skills.network")

CLI example

python -m 'skillsnetwork.cvstudio'

Contributing

Please see CONTRIBUTING.md

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

skillsnetwork-0.19.2.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skillsnetwork-0.19.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file skillsnetwork-0.19.2.tar.gz.

File metadata

  • Download URL: skillsnetwork-0.19.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for skillsnetwork-0.19.2.tar.gz
Algorithm Hash digest
SHA256 69eb198c6248bfad32ae58e96422c10735081643b736ac1033a78794b210964e
MD5 08ff3e449d8dd12242fd29bb5f9d57c4
BLAKE2b-256 21eea07802d1f557b3bc3d8bc66ad48addba80819270076150ea89155a72d30f

See more details on using hashes here.

File details

Details for the file skillsnetwork-0.19.2-py3-none-any.whl.

File metadata

  • Download URL: skillsnetwork-0.19.2-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for skillsnetwork-0.19.2-py3-none-any.whl
Algorithm Hash digest
SHA256 76bef00c02234123ac5d39d47f695ce0c298b089d9364bfdf1ff4861c03cf9dd
MD5 281607082d6e4515df13df61c9876910
BLAKE2b-256 bf83d364fa948a1a2a7d5656a478dcaeb80b66d9c8c0c856dd8b9c6e6bbbe0b0

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