ipfs-shipyard / ipfs-shipyard/py-ipfs-http-client
Add bytes or json with filename without saving it to a temporary file
Open
- Dominant language
- Python
- Stars
- 685
- Forks
- 200
- PR merge metrics
- No merged PRs in 30d
Description
Is there any way to add bytes or JSON data without saving it to a temporary file before adding it to IPFS? I wanna do something like
```python
sample_dict = {
"some_key": "some_value"
}
client.add_json(sample_dict, filename="some_data.json")
```
Instead, I have to do this
```python
sample_dict = {
"some_key": "some_value"
}
with open('some_data.json', 'w') as f:
json.dump(sample_dict, f)
client.add('some_data.json')
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.