(s3_server)
| 2923 | |
| 2924 | @pytest.fixture |
| 2925 | def s3_example_simple(s3_server): |
| 2926 | from pyarrow.fs import FileSystem |
| 2927 | |
| 2928 | host, port, access_key, secret_key = s3_server['connection'] |
| 2929 | uri = ( |
| 2930 | f"s3://{access_key}:{secret_key}@mybucket/data.parquet?scheme=http" |
| 2931 | f"&endpoint_override={host}:{port}&allow_bucket_creation=True" |
| 2932 | ) |
| 2933 | |
| 2934 | fs, path = FileSystem.from_uri(uri) |
| 2935 | |
| 2936 | fs.create_dir("mybucket") |
| 2937 | table = pa.table({'a': [1, 2, 3]}) |
| 2938 | with fs.open_output_stream("mybucket/data.parquet") as out: |
| 2939 | pq.write_table(table, out) |
| 2940 | |
| 2941 | return table, path, fs, uri, host, port, access_key, secret_key |
| 2942 | |
| 2943 | |
| 2944 | @pytest.mark.parquet |
nothing calls this directly
no test coverage detected