feat: move to external config

This commit is contained in:
transcaffeine 2021-05-23 12:28:13 +02:00
parent c9b82bfe81
commit 89672b1306
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
2 changed files with 3 additions and 2 deletions

2
config.py Normal file
View File

@ -0,0 +1,2 @@
LDAP_URI = "ldap://127.0.0.1:389"
LDAP_BASE_DN = "ou=accounts,dc=example,dc=org"

View File

@ -4,8 +4,7 @@ from fastapi import FastAPI, HTTPException, Response
from pydantic import BaseModel
from ldap import modlist
LDAP_URI = "ldap://10.42.0.1:389"
LDAP_BASE_DN = "ou=users,dc=finallycoffee,dc=eu"
from config import LDAP_URI, LDAP_BASE_DN
app = FastAPI()