[24.02.20] deleted api tokens and load from env
This commit is contained in:
parent
92b5dd1e6c
commit
57f69ecade
@ -4,6 +4,6 @@ RUN apk update && \
|
||||
apk add py-pip libc-dev gcc
|
||||
RUN pip install utils pycryptodome && \
|
||||
pip install python-env coinbase
|
||||
COPY /* /home/price-collector/
|
||||
COPY /price-collector /home/price-collector/
|
||||
EXPOSE 9090
|
||||
CMD ["python", "/home/price-collector/src/main.py"]
|
||||
@ -1,2 +0,0 @@
|
||||
API_KEY=B1efIaTHpUk5Bh1W
|
||||
API_SECRET=nqBiADFQ2I8UeyLhHaSH0IdeqkFcCq1K
|
||||
@ -5,15 +5,13 @@ import sys, os
|
||||
from coinbase.wallet.client import Client
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from pathlib import Path # python3 only
|
||||
env_path = Path('.') / 'configuration/coinbase.env'
|
||||
load_dotenv(dotenv_path=env_path)
|
||||
load_dotenv()
|
||||
|
||||
class keys():
|
||||
|
||||
def __init__(self):
|
||||
self.api_key = os.getenv('API_KEY')
|
||||
self.api_secret = os.getenv("API_SECRET")
|
||||
self.api_key = os.getenv('COINBASE_KEY')
|
||||
self.api_secret = os.getenv("COINBASE_SECRET")
|
||||
|
||||
def coinbasePublicTicker(type):
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user