You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An SDK conforming to the Spectra S3 [specification](https://developer.spectralogic.com/doc/ds3api/1.2/wwhelp/wwhimpl/js/html/wwhelp.htm) for Python 3.6
7
5
8
-
Contact Us
9
-
----------
10
-
6
+
## Contact Us
11
7
Join us at our [Google Groups](https://groups.google.com/d/forum/spectralogicds3-sdks) forum to ask questions, or see frequently asked questions.
12
8
13
-
Installing
14
-
----------
15
-
9
+
## Installing
16
10
To install the ds3_python3_sdk, either clone the latest code, or download a release bundle from [Releases](http://github.com/SpectraLogic/ds3_python3_sdk/releases). Once the code has been download, cd into the bundle, and install it with `sudo python3 setup.py install`
17
11
18
12
Once `setup.py` completes the ds3_python3_sdk should be installed and available to be imported into python scripts.
19
13
20
-
Documentation
21
-
-------------
14
+
## Documentation
22
15
The documentation for the SDK can be found at [http://spectralogic.github.io/ds3_python3_sdk/sphinx/v3.4.1/](http://spectralogic.github.io/ds3_python3_sdk/sphinx/v3.4.1/)
23
16
24
-
SDK
25
-
---
26
-
17
+
## SDK
27
18
The SDK provides an interface for a user to add Spectra S3 functionality to their existing or new python application. In order to take advantage of the SDK you need to import the `ds3` python package and module. The following is an example that creates a Spectra S3 client from environment variables, creates a bucket, and lists all the buckets that are visible to the user.
28
19
29
20
```python
@@ -40,8 +31,7 @@ for bucket in getServiceResponse.result['BucketList']:
40
31
print(bucket['Name'])
41
32
```
42
33
43
-
Client
44
-
---------
34
+
## Client
45
35
In the ds3_python3_sdk there are two ways that you can create a `Client` instance: environment variables, or manually. `ds3.createClientFromEnv` will create a `Client` using the following environment variables:
The proxy URL can be passed in as the named parameter `proxy` to `Client()`.
63
53
64
-
Putting Data
65
-
------------
54
+
## Examples Communicating with the BP
55
+
56
+
[An example of using getService and getBucket to list all accessible buckets and objects](samples/listAll.py)
66
57
67
-
To put data to a Spectra S3 appliance you have to do it inside of the context of what is called a Bulk Job. Bulk Jobs allow the Spectra S3 appliance to plan how data should land to cache, and subsequently get written/read to/from tape. The basic flow of every job is:
58
+
### HELPERS: Simple way of moving data to/from a file system
59
+
There are helper utilities for putting and getting data to a BP. These are designed to simplify the user workflow so
60
+
that you don't have to worry about BP job management. The helpers will create BP jobs as necessary, and transfer data
61
+
in parallel to improve performance.
62
+
63
+
#### How to move everything:
64
+
-[An example of putting ALL files in a directory to a BP bucket](samples/putting_all_files_in_directory.py)
65
+
-[An example of getting ALL objects in a bucket and landing them in a directory](samples/getting_all_objects_in_bucket.py)
66
+
67
+
#### How to move some things:
68
+
If you only want to move some items in a directory/bucket, you can specify them individually. These examples show how
69
+
to put and get a specific file, but the principle can be expanded to transferring multiple items at once.
70
+
-[An example of putting ONE file to a BP bucket](samples/putting_one_file_in_directory.py)
71
+
-[An example of getting ONE object in a bucket](samples/getting_one_file_in_directory.py)
72
+
73
+
### Moving data the old way
74
+
To put data to a Spectra S3 appliance you have to do it inside the context of what is called a Bulk Job. Bulk Jobs allow the Spectra S3 appliance to plan how data should land to cache, and subsequently get written/read to/from tape. The basic flow of every job is:
68
75
69
76
* Generate the list of objects that will either be sent to or retrieved from Spectra S3
70
77
* Send a bulk put/get to Spectra S3 to plan the job
@@ -76,6 +83,4 @@ To put data to a Spectra S3 appliance you have to do it inside of the context of
76
83
77
84
[An example of getting data with the Python SDK](samples/gettingData.py)
78
85
79
-
[An example of using getService and getBucket to list all accessible buckets and objects](samples/listAll.py)
80
-
81
86
[An example of how give objects on the server a different name than what is on the filesystem, and how to delete objects by folder](samples/renaming.py)
0 commit comments