mirror of
https://github.com/Xevion/linkpulse.git
synced 2026-01-31 06:24:47 -06:00
Minor documentation improvement in utilities.py
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user