You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Many **utility** and **parse methods** to retrieve data as needed *(check the [API](#api) section)*.
25
26
- Well **tested**. ;)
26
27
@@ -437,7 +438,7 @@ d.unique()
437
438
438
439
### I/O methods
439
440
440
-
It is possible to create a `benedict` instance directly from datasource (filepath, urlor data-string) by passing the data source and the data format (default 'json') in the constructor.
441
+
It is possible to create a `benedict` instance directly from data-source (`filepath`, `url`, `s3`or `data-string`) by passing the data source and the data format (optional, default 'json') in the constructor.
441
442
442
443
```python
443
444
# filepath
@@ -446,11 +447,14 @@ d = benedict('/root/data.yml', format='yaml')
446
447
# url
447
448
d = benedict('https://localhost:8000/data.xml', format='xml')
448
449
450
+
# s3
451
+
d = benedict('s3://my-bucket/data.xml', s3_options={"aws_access_key_id": "...", "aws_secret_access_key": "..."})
These methods simplify I/O operations with most common formats: `base64`, `csv`, `json`, `pickle`, `plist`, `query-string`, `toml`, `xml`, `yaml`.
457
+
These methods simplify I/O operations with most common formats: `base64`, `csv`, `ini`, `json`, `pickle`, `plist`, `query-string`, `toml`, `xls`, `xml`, `yaml`.
454
458
455
459
In all `from_*` methods, the first argument can be: **url**, **filepath** or **data-string**.
0 commit comments