Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,19 @@ import networkx as nx
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
import uuid
|
5 |
|
|
|
|
|
|
|
|
|
|
|
6 |
# Diccionario para almacenar los aportes y sus conexiones
|
7 |
aportes = {}
|
8 |
G = nx.Graph()
|
9 |
|
10 |
def guardar_en_airtable(nombre, enfoque, norma, texto):
|
11 |
-
url = f"https://api.airtable.com/v0/{
|
12 |
headers = {
|
13 |
-
"Authorization": f"Bearer {
|
14 |
"Content-Type": "application/json"
|
15 |
}
|
16 |
data = {"fields": {"Nombre": nombre, "Enfoque": enfoque, "Norma": norma, "Texto_HF": texto}}
|
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
import uuid
|
5 |
|
6 |
+
api_key = os.getenv("AIRT_KEY")
|
7 |
+
AIRT_DBASEx = os.getenv("AIRT_DBASE")
|
8 |
+
AIRT_TABLEx = os.getenv("AIRT_TABLE")
|
9 |
+
receiver_email = os.getenv("EMAIL_USER")
|
10 |
+
|
11 |
# Diccionario para almacenar los aportes y sus conexiones
|
12 |
aportes = {}
|
13 |
G = nx.Graph()
|
14 |
|
15 |
def guardar_en_airtable(nombre, enfoque, norma, texto):
|
16 |
+
url = f"https://api.airtable.com/v0/{AIRT_DBASEx}/{AIRT_TABLEx}"
|
17 |
headers = {
|
18 |
+
"Authorization": f"Bearer {api_key}",
|
19 |
"Content-Type": "application/json"
|
20 |
}
|
21 |
data = {"fields": {"Nombre": nombre, "Enfoque": enfoque, "Norma": norma, "Texto_HF": texto}}
|