This project has been archived by its maintainers, and is no longer receiving any updates.
PubWeb Client
A Python 3.8+ library for the PubWeb platform.
Installation
You can install PubWeb using pip:
pip install pubweb
or by cloning the repository and running:
python setup.py install
Set Up
Run a one-time configuration of your login credentials in the command line using:
pubweb-cli configure
This will ask you to select an authentication method. If you are a member of Fred Hutch or the University of Washington, select the default method which will give you a link to use to log through the browser. If you are not a member of those institutions, select the non-institutional authentication method and enter your Data Portal username and password into the command line when prompted.
Command Line Usage
Downloading a dataset:
Usage: pubweb-cli download [OPTIONS]
Download dataset files
Options:
--project TEXT Name or ID of the project
--dataset TEXT ID of the dataset
--data-directory TEXT Directory to store the files
--interactive Gather arguments interactively
--help Show this message and exit.
Uploading a dataset:
Usage: pubweb-cli upload [OPTIONS]
Upload and create a dataset
Options:
--name TEXT Name of the dataset
--description TEXT Description of the dataset (optional)
--project TEXT Name or ID of the project
--process TEXT Name or ID of the ingest process
--data-directory TEXT Directory you wish to upload
--interactive Gather arguments interactively
--use-third-party-tool Use third party tool for upload (Generate manifest and one-time upload authentication token)
--help Show this message and exit.
Listing datasets:
Usage: pubweb-cli list-datasets [OPTIONS]
List available datasets
Options:
--project TEXT ID of the project
--interactive Gather arguments interactively
--help Show this message and exit.
Interactive Commands
When running a command, you can specify the --interactive flag to gather the command arguments interactively.
Example:
$ pubweb-cli upload --interactive
? What project is this dataset associated with? Test project
? Enter the full path of the data directory /shared/biodata/test
? Please confirm that you wish to upload 20 files (0.630 GB) Yes
? What type of files? Illumina Sequencing Run
? What is the name of this dataset? test
? Enter a description of the dataset (optional)
? How would you like to upload or download your data? PubWeb CLI
Python Usage
See the following set of Jupyter notebooks that contain examples on the following topics:
| Jupyter Notebook | Topic |
|---|---|
| Introduction | Installing and authenticating |
| Uploading a dataset | Uploading data |
| Downloading a dataset | Downloading data |
| Interacting with a dataset | Calling data and reading into tables |
| Analyzing a dataset | Running analysis pipelines |
| Using references | Managing reference data |
R Usage
| Jupyter Notebook | Topic |
|---|---|
| Downloading a dataset in R | Reading data with R |
Advanced Usage
Supported environment variables
| Name | Description | Default |
|---|---|---|
| PW_HOME | Local configuration directory | ~/.pubweb |
| PW_BASE_URL | Base URL of the data portal | data-portal.io |
Configuration
The pubweb-cli configure command creates a file in PW_HOME called config.ini.
You can set the base_url property in the config file rather than using the environment variable.
[General]
base_url = data-portal.io
Metadata
Release files for pubweb 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pubweb-0.5.0-py3.8.egg | Legacy Egg format | - | - | Details |
| pubweb-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 217.8 kB
Release files / pubweb-0.5.0-py3.8.egg
| Download URL | pubweb-0.5.0-py3.8.egg |
|---|---|
| Size | 154.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7624f19ccde04ed4a9969413139b83f584845f7129e8d8fce6a5800f25e85209
|
|
BLAKE2b-256 checksum How to use checksums |
eee231556bafe4e86361dafa23e6d00e0e0ec63b7ce1558f8ffcfc2b1ad2880e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / pubweb-0.5.0-py3-none-any.whl
| Download URL | pubweb-0.5.0-py3-none-any.whl |
|---|---|
| Size | 63.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
817ae8198d3e2efe64b979898f0ac2194e56f0a44cf70cbcf9f0f155940988c5
|
|
BLAKE2b-256 checksum How to use checksums |
e0f305a40f54e950f3ff0c5b40f19ef04fc5a80044b9946b2177f9479e48a695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|