__init__.py 354 B

1234567891011121314151617181920
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import os
  4. from dotenv import find_dotenv, load_dotenv
  5. # get env
  6. env = os.getenv("FASTAPI_MODE")
  7. if not env:
  8. load_dotenv(find_dotenv())
  9. env = os.getenv("FASTAPI_MODE")
  10. if env == "production":
  11. from .production import settings
  12. else:
  13. from .development import settings
  14. __all__ = ["settings"]