aws 1.1.0
aws client services
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
AWS Client
Client for AWS services. Currently only supports S3.
Usage
import aws.s3;
import aws.aws;
import aws.credentials;
import std.algorithm : joiner;
import std.array : array;
void main() {
import std.array : appender;
import std.stdio;
auto creds = new StaticAWSCredentials("test", "test");
auto region = "us-east-1";
auto endpoint = "http://localhost:4566";
auto s3 = new S3(endpoint,region,creds);
s3.createBucket("test-bucket");
s3.upload("test-bucket", "myfile", cast(ubyte[])[48,49,50,51,52,53]);
s3.download("test-bucket", "myfile").receiveAsRange.joiner().array().writeln();
auto directories = appender!string;
auto files = appender!string;
string marker = null;
while(true)
{
auto result = s3.list("test-bucket", "/", null,marker,100);
foreach(directory; result.commonPrefixes)
directories.put(directory~"\n");
foreach(file; result.resources)
files.put(file.key~"\n");
if (result.isTruncated)
marker = result.nextMarker;
else
break;
}
writeln(directories);
writeln(files);
}
- Registered by Koppe
- 1.1.0 released 3 years ago
- skoppe/aws
- MIT
- Copyright © 2015, see Authors
- Authors:
- Dependencies:
- requests, arsd-official:dom
- Versions:
-
1.1.11 2022-Nov-03 1.1.10 2022-Jan-25 1.1.0 2021-Jul-20 1.0.0 2021-Jul-15 ~master 2022-Nov-03 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
37 downloads total
-
- Score:
- 0.9
- Short URL:
- aws.dub.pm