Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvin-reyes/shuttle-to-gateway
Simple shuttle to gateway manual data transfer
https://github.com/alvin-reyes/shuttle-to-gateway
Last synced: 25 days ago
JSON representation
Simple shuttle to gateway manual data transfer
- Host: GitHub
- URL: https://github.com/alvin-reyes/shuttle-to-gateway
- Owner: alvin-reyes
- Created: 2023-03-02T15:41:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-05T12:22:40.000Z (over 1 year ago)
- Last Synced: 2024-10-12T13:41:14.144Z (about 1 month ago)
- Language: Python
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shuttle-to-gateway
Simple shuttle to gateway manual data transfer. It'll basically download the CID from reliable IPFS nodes and push it to Estuary gateway## Install
```
git clone https://github.com/alvin-reyes/shuttle-to-gateway
```## Configure
```
def download_and_upload(url):
r = requests.get(url, allow_redirects=True)
open('./download/' + line, 'wb').write(r.content)
# CHANGE URL if you want to push to another gateway
url = "https://gateway.estuary.tech/upload"
payload = {}
files = [
('file', ('file', open('./download/' + line, 'rb'), 'application/octet-stream'))
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.status_code)# remove file
os.remove('./download/' + line)
# change the text file here if you want to use your own list of CIDs
with open('jin_files.txt') as jin_hashes:
```
## Running
```
cd shuttle-to-gateway
python main.py
```