eong commited on
Commit
2744ebd
·
verified ·
1 Parent(s): 85021fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -51,11 +51,8 @@ def crypto_analysis(crypto_name: str) -> str:
51
  A JSON-formatted string containing the crypto analysis if successful,
52
  otherwise an error message
53
  """
54
- import os
55
- import json
56
- import requests
57
 
58
- url = f"https://rest.coincap.io/v3/assets/{crypto_name}?apiKey={os.getenv(key='coin_api')}"
59
  try:
60
  response = requests.get(url)
61
  response.raise_for_status() # Raise exception for bad status codes
 
51
  A JSON-formatted string containing the crypto analysis if successful,
52
  otherwise an error message
53
  """
 
 
 
54
 
55
+ url = f"https://rest.coincap.io/v3/assets/{crypto_name}?apiKey={os.getenv(key='coincap_api')}"
56
  try:
57
  response = requests.get(url)
58
  response.raise_for_status() # Raise exception for bad status codes