Minor documentation improvement in utilities.py

This commit is contained in:
2024-11-01 18:12:34 -05:00
parent 01f6d348cd
commit b7d9b256d9
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `__main__.py` - `__main__.py`
- `logging.py` - `logging.py`
- `models.py` - `models.py`
- `utilities.py`
- A `get_db` utility function to retrieve a reference to the database (with type hinting) - A `get_db` utility function to retrieve a reference to the database (with type hinting)
- Minor `DATABASE_URL` check in `models.py` to prevent cryptic connection issues - Minor `DATABASE_URL` check in `models.py` to prevent cryptic connection issues
+6
View File
@@ -1,8 +1,14 @@
"""utilities.py
This module provides utility functions for database connection, string manipulation, and IP address handling.
"""
import os import os
from typing import Optional from typing import Optional
from fastapi import Request from fastapi import Request
from peewee import PostgresqlDatabase from peewee import PostgresqlDatabase
# globally referenced
is_development = os.getenv("ENVIRONMENT") == "development" is_development = os.getenv("ENVIRONMENT") == "development"