mirror of
https://github.com/minio/mc.git
synced 2025-11-13 12:22:45 +03:00
Bring old documentation back
This commit is contained in:
6
docs/sdks/python/example-list-buckets.py
Normal file
6
docs/sdks/python/example-list-buckets.py
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import boto3
|
||||
s3 = boto3.resource('s3', use_ssl=False, endpoint_url="http://localhost:9000")
|
||||
for bucket in s3.buckets.all():
|
||||
print(bucket.name)
|
||||
34
docs/sdks/python/python.md
Normal file
34
docs/sdks/python/python.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Using AWS SDK for Python
|
||||
|
||||
## Install
|
||||
|
||||
### In Python 2.6, 2.7, 3.3, 3.4
|
||||
|
||||
**WARNING**: Boto 3 is in *developer preview* and **should not** be used in production yet!
|
||||
|
||||
```
|
||||
pip install boto3
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
Next, set up credentials (in e.g. ``~/.aws/credentials``)::
|
||||
|
||||
[default]
|
||||
aws_access_key_id = YOUR_MINIO_ACCESS_ID
|
||||
aws_secret_access_key = YOUR_MINIO_SECRET_KEY
|
||||
|
||||
```
|
||||
#!/usr/bin/env python
|
||||
|
||||
import boto3
|
||||
s3 = boto3.resource('s3', use_ssl=False, endpoint_url="http://localhost:9000")
|
||||
for bucket in s3.buckets.all():
|
||||
print(bucket.name)
|
||||
...
|
||||
bucket1
|
||||
bucket2
|
||||
bucket3
|
||||
```
|
||||
|
||||
Grab it here [example-list-buckets.py](https://github.com/Minio-io/mc/blob/master/docs/sdks/python/example-list-buckets.py)
|
||||
Reference in New Issue
Block a user