Official Python client for the DNAWave API
Project description
DNAWave Python Client
The official Python client for the DNAWave API. This package provides a simple and intuitive way to interact with DNAWave's services.
Installation
pip install dnawave
Quick Start
from dnawave import DNAWaveClient, Dataset, Workflow
# Initialize the client
client = DNAWaveClient(api_key="your-api-key")
Dataset.set_client(client)
Workflow.set_client(client)
# Create a dataset
dataset = Dataset.create(
name="My Dataset",
bucket_key="s3-bucket-key",
description="My dataset description",
keywords=["gene", "sequence"],
tags=[{"id": "tag-id", "name": "tag-name"}]
)
# List datasets
datasets = Dataset.list()
for dataset in datasets:
print(dataset.name)
# Get a specific dataset
dataset = Dataset.get("dataset-id")
# Update a dataset
dataset.description = "Updated description"
dataset.save()
# Delete a dataset
dataset.delete()
# Work with workflows
workflow = Workflow.create(
name="My Workflow",
engine="nextflow",
parameter_template={"param1": "value1"}
)
workflows = Workflow.list()
Features
- Full support for DNAWave API endpoints
- Easy-to-use object-oriented interface
- Automatic request retries and error handling
- Type hints for better IDE support
Error Handling
from dnawave import DNAWaveError, AuthenticationError
try:
dataset = Dataset.get("non-existent-id")
except AuthenticationError:
print("Invalid API key")
except DNAWaveError as e:
print(f"API error: {str(e)}")
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dnawave-0.1.0.tar.gz.
File metadata
- Download URL: dnawave-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
267ba1a5ad7aa3c419410992c634705c25db98a61b7107624e4440c70a9a1e41
|
|
| MD5 |
4fcbacf0295736f0a183439d417af37b
|
|
| BLAKE2b-256 |
41ca1cc67998ef5aec6048ea6c61c163e054fec0d8fcf5a62ac748962fc20248
|
File details
Details for the file dnawave-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dnawave-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12fe75ac380893a4337a8365474bbd2951e07afe5182d82336d8f59ec2077ae8
|
|
| MD5 |
aa29c0b9b7223c9f4c50f77b9add581d
|
|
| BLAKE2b-256 |
db9c717b737afdbf66c9b337242c0666a8712416d848d06a8604890991b73e7a
|