Skip to content

Commit

Permalink
0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hicetnunc2000 committed Jan 3, 2021
0 parents commit 878e4e0
Show file tree
Hide file tree
Showing 1,557 changed files with 104,558 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Distribution / packaging
.Python
*.pyc
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Serverless directories
.serverless
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM python:latest

RUN pip install --upgrade pip

RUN apt-get update

COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt

EXPOSE 5000

ENTRYPOINT ["python"]
CMD ["app.py"]
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# hesychasm

https://l2qqvxozj5.execute-api.us-east-1.amazonaws.com/dev/

IPFS serverless infrastructure

### docker build
```
docker build -t ipfs-sls:latest .
docker run -d -p 3000:3000 ipfs-sls
curl --header "Content-Type: application/json" --request POST --data '{"data": {"title":"title","description":"description"}}' https://l2qqvxozj5.execute-api.us-east-1.amazonaws.com/dev/ipfs/post_json
{"hash":"QmP4Azn85QGrBXxzVkNAfFPS2a7hkE4uTdWxBE4TDErs1F"}
curl --header "Content-Type: application/json" --request POST --data '{"hash":"QmP4Azn85QGrBXxzVkNAfFPS2a7hkE4uTdWxBE4TDErs1F"}' https://l2qqvxozj5.execute-api.us-east-1.amazonaws.com/dev/ipfs/get_json
{"data":{"title":"title","description":"description"}}
curl -i -X POST -H "Content-Type: multipart/form-data" -F "[email protected]" https://l2qqvxozj5.execute-api.us-east-1.amazonaws.com/dev/ipfs/post_file
{"hash":"QmT9SX2YFqitWQPxPzA1gEZxgJqBRZP1Zc5ZyStaBfY3UW"}
```
27 changes: 27 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

from flask import Flask
from flask_restx import Api
from flask_cors import CORS, cross_origin

# ROUTES

from routes.ipfs import api as ipfs_api

app = Flask(__name__)

cors = CORS(app, supports_credentials=True)

api = Api()
api = Api(version = 'v1.0.0',
title = 'hesychasm',
description= 'A serverless API for managing IPFS Content Identifiers (CIDs)',
contact='[email protected]')

# NAMESPACES

api.add_namespace(ipfs_api)

api.init_app(app)

if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=5000)
18 changes: 18 additions & 0 deletions libs/validate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

import json

# Validate different possible ways of Sessions concerning key's configurations
# and Requests that can be presented by users

class Validate():
def __init__(self):
pass

# interpret requests in it's possible formats
# returns a json with requested data

def read_requests(self, request):
if (request.data.__len__() == 0):
return request.args.to_dict(flat=True)
else:
return json.loads(request.data)
1 change: 1 addition & 0 deletions node_modules/.bin/glob-all

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/is-docker

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

278 changes: 278 additions & 0 deletions node_modules/@iarna/toml/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 878e4e0

Please sign in to comment.