Skip to content

Commit 778170c

Browse files
maxispeicherigorborgest
authored andcommitted
Add wildcard documentation
Signed-off-by: Maximilian Speicher <[email protected]>
1 parent 9bbd661 commit 778170c

File tree

8 files changed

+25
-1
lines changed

8 files changed

+25
-1
lines changed

awswrangler/s3/_copy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def merge_datasets(
5555
This function accepts Unix shell-style wildcards in the source_path argument.
5656
* (matches everything), ? (matches any single character),
5757
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
58+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
59+
you can use `glob.escape(source_path)` before passing the path to this function.
5860
5961
Note
6062
----

awswrangler/s3/_delete.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def delete_objects(
9494
This function accepts Unix shell-style wildcards in the path argument.
9595
* (matches everything), ? (matches any single character),
9696
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
97+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
98+
you can use `glob.escape(path)` before passing the path to this function.
9799
98100
Note
99101
----

awswrangler/s3/_describe.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def describe_objects(
5858
This function accepts Unix shell-style wildcards in the path argument.
5959
* (matches everything), ? (matches any single character),
6060
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
61+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
62+
you can use `glob.escape(path)` before passing the path to this function.
6163
6264
Note
6365
----
@@ -147,6 +149,8 @@ def size_objects(
147149
This function accepts Unix shell-style wildcards in the path argument.
148150
* (matches everything), ? (matches any single character),
149151
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
152+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
153+
you can use `glob.escape(path)` before passing the path to this function.
150154
151155
Note
152156
----

awswrangler/s3/_list.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def list_directories(
203203
This function accepts Unix shell-style wildcards in the path argument.
204204
* (matches everything), ? (matches any single character),
205205
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
206+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
207+
you can use `glob.escape(path)` before passing the path to this function.
206208
207209
Parameters
208210
----------
@@ -255,6 +257,8 @@ def list_objects(
255257
This function accepts Unix shell-style wildcards in the path argument.
256258
* (matches everything), ? (matches any single character),
257259
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
260+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
261+
you can use `glob.escape(path)` before passing the path to this function.
258262
259263
Note
260264
----

awswrangler/s3/_read_parquet.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ def read_parquet(
455455
This function accepts Unix shell-style wildcards in the path argument.
456456
* (matches everything), ? (matches any single character),
457457
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
458+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
459+
you can use `glob.escape(path)` before passing the path to this function.
458460
459461
Note
460462
----
@@ -796,6 +798,8 @@ def read_parquet_metadata(
796798
This function accepts Unix shell-style wildcards in the path argument.
797799
* (matches everything), ? (matches any single character),
798800
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
801+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
802+
you can use `glob.escape(path)` before passing the path to this function.
799803
800804
Note
801805
----

awswrangler/s3/_read_text.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ def read_csv(
164164
This function accepts Unix shell-style wildcards in the path argument.
165165
* (matches everything), ? (matches any single character),
166166
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
167+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
168+
you can use `glob.escape(path)` before passing the path to this function.
167169
168170
Note
169171
----
@@ -304,6 +306,8 @@ def read_fwf(
304306
This function accepts Unix shell-style wildcards in the path argument.
305307
* (matches everything), ? (matches any single character),
306308
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
309+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
310+
you can use `glob.escape(path)` before passing the path to this function.
307311
308312
Note
309313
----
@@ -445,6 +449,8 @@ def read_json(
445449
This function accepts Unix shell-style wildcards in the path argument.
446450
* (matches everything), ? (matches any single character),
447451
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
452+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
453+
you can use `glob.escape(path)` before passing the path to this function.
448454
449455
Note
450456
----

awswrangler/s3/_write_parquet.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,8 @@ def store_parquet_metadata( # pylint: disable=too-many-arguments
650650
This function accepts Unix shell-style wildcards in the path argument.
651651
* (matches everything), ? (matches any single character),
652652
[seq] (matches any character in seq), [!seq] (matches any character not in seq).
653+
If you want to use a path which includes Unix shell-style wildcard characters (`*, ?, []`),
654+
you can use `glob.escape(path)` before passing the path to this function.
653655
654656
Note
655657
----

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
with open(file=path, mode="r", encoding="utf-8") as f:
1111
exec(f.read(), about)
1212

13-
with open("README.md", "r") as fh:
13+
with open("README.md", "r", encoding="utf-8") as fh:
1414
long_description = fh.read()
1515

1616
setup(

0 commit comments

Comments
 (0)