-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Injecting examples into docs at build-time #402
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
List objects in an Amazon S3 bucket | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The following example shows how to use an Amazon S3 bucket resource to list | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This technically is to get attributes that are not located on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, my bad :8 I'll fix this. |
||
the objects in the bucket. | ||
|
||
.. code-block:: python | ||
|
||
import boto3 | ||
|
||
s3 = boto3.resource('s3') | ||
bucket = s3.Bucket('my-bucket') | ||
for obj in bucket.objects.all(): | ||
print(obj.key) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
** This is an example ** | ||
|
||
This is the contents! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**Other example** | ||
|
||
This is for another service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I would prefer to use os.path.join(..., ..., ...) in favor of os.sep.join([..., ..., ...]), because it is conceptually a high level API.
This is NOT a must-fix. I will still give out a "ship-it" for this PR based on its current implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. That's much nicer. Thanks!