-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python 3.12; Refactor and little enhancements.
- Loading branch information
Benyamin Ginzburg
committed
Aug 1, 2024
1 parent
870581f
commit 44c63f3
Showing
24 changed files
with
1,390 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,3 +107,4 @@ venv.bak/ | |
Pipfile.lock | ||
/gtfs_data/* | ||
/gtfs_data/ | ||
/.pdm-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# bus-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version = '0.0.1' | ||
version = '0.1.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
from pydantic import BaseSettings, Field | ||
from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
||
|
||
class Env(BaseSettings): | ||
|
||
class Config: | ||
env_file = '../.env' | ||
env_file_encoding = 'utf-8' | ||
model_config = SettingsConfigDict(env_file='../.env', env_file_encoding='utf-8') | ||
|
||
SIRI_URL: str = Field(..., env='SIRI_URL') | ||
GTFS_URL: str = Field(..., env='GTFS_FTP_URL') | ||
API_KEY: str = Field(..., env='API_KEY') | ||
ROOT_PATH: str = Field('', env='ROOT_PATH') | ||
DB_URL: str = Field('localhost', env='DB_URL') | ||
DB_NAME: str = Field(..., env='DB_NAME') | ||
SCHED_HOURS: int = Field(..., env='SCHED_HOURS') | ||
SCHED_MINS: int = Field(..., env='SCHED_MINS') | ||
SIRI_URL: str | ||
GTFS_FTP_URL: str | ||
API_KEY: str | ||
ROOT_PATH: str = '/' | ||
DB_DSN: str | ||
SCHED_HOURS: int | ||
SCHED_MINS: int | ||
|
||
|
||
env = Env() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from israel_transport_api.gtfs.repository.stops_repository import init_db | ||
from .gtfs_retriever import init_gtfs_data | ||
from .router import stops_router, routes_router | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.