Skip to content

Commit

Permalink
first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
FG5D627N committed Mar 22, 2023
1 parent 4cda710 commit b07bf7b
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# SendWalletDisplay
This is simple python script who read json and send them to minotor

## How to use

### install python

https://www.python.org/downloads/

### Get the code

#### from git

- install git (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
-

### install dep

`pip install -r req.txt`
22 changes: 22 additions & 0 deletions SendDisplay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests
import json



def load_json_file():
with open("wallet.json") as f:
return json.loads(f.read())


def send_http_post(json_obj):
r = requests.post('https://mythologic.fr:8080', json=json_obj)
print(r.status_code, r.text)


def main():
json_obj = load_json_file()
send_http_post(json_obj)


if __name__ == '__main__':
main()
1 change: 1 addition & 0 deletions req.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests
47 changes: 47 additions & 0 deletions sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"pseudo": "Daviv09",
"wallet_overview": [
{
"token": "eth",
"amount": 0.20
},
{
"token": "sol",
"amount": 10
},
{
"token": "atom",
"amount": 80
},
{
"token": "evmos",
"amount": 550
},
{
"token": "osmo",
"amount": 260
},
{
"token": "cake",
"amount": 180
},
{
"token": "dolz",
"amount": 70000,
"price": 0.01269
},
{
"token": "juno",
"amount": 55
},
{
"token": "stz",
"amount": 2800,
"price": 0.00094023
},
{
"token": "axl",
"amount": 205
}
]
}

0 comments on commit b07bf7b

Please sign in to comment.