Database
db
¤
Modules:
Name | Description |
---|---|
base |
|
client |
|
models |
|
user |
|
Functions:
Name | Description |
---|---|
ensure_pb_exists |
|
start |
|
Attributes:
Name | Type | Description |
---|---|---|
PB_VERSION |
|
|
base_path |
|
base
¤
Classes:
Name | Description |
---|---|
BaseService |
|
client
¤
models
¤
Modules:
Name | Description |
---|---|
aircraft |
|
airport |
|
demand |
|
game |
|
route |
|
ticket |
|
util |
|
aircraft
¤
Classes:
Name | Description |
---|---|
PyPaxConfig |
|
PyCargoConfig |
|
PyAircraft |
|
PyAircraftSuggestion |
|
Attributes:
Name | Type | Description |
---|---|---|
PyPaxConfigAlgorithm |
|
|
PyCargoConfigAlgorithm |
|
|
PyConfigAlgorithmPax |
|
|
PyConfigAlgorithmCargo |
|
PyPaxConfigAlgorithm
module-attribute
¤
PyPaxConfigAlgorithm = Literal[
"AUTO", "FJY", "FYJ", "JFY", "JYF", "YFJ", "YJF"
]
PyConfigAlgorithmPax
module-attribute
¤
PyConfigAlgorithmPax = Literal[
"AUTO", "FJY", "FYJ", "JFY", "JYF", "YFJ", "YJF"
]
PyPaxConfig
¤
PyCargoConfig
¤
PyAircraft
¤
Bases: BaseModel
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
|
shortname |
str
|
|
manufacturer |
str
|
|
name |
str
|
|
type |
Literal['PAX', 'CARGO', 'VIP']
|
|
priority |
int
|
|
eid |
int
|
|
ename |
str
|
|
speed |
float
|
|
fuel |
float
|
|
co2 |
float
|
|
cost |
int
|
|
capacity |
int
|
|
rwy |
int
|
|
check_cost |
int
|
|
range |
int
|
|
ceil |
int
|
|
maint |
int
|
|
pilots |
int
|
|
crew |
int
|
|
engineers |
int
|
|
technicians |
int
|
|
img |
str
|
|
wingspan |
int
|
|
length |
int
|
|
speed_mod |
bool
|
|
fuel_mod |
bool
|
|
co2_mod |
bool
|
|
fourx_mod |
bool
|
|
PyAircraftSuggestion
¤
airport
¤
demand
¤
game
¤
Classes:
Name | Description |
---|---|
PyUser |
|
Attributes:
Name | Type | Description |
---|---|---|
StrToUpper |
|
|
StrPctToFloat |
|
|
PyUserWhitelistedKeys |
|
StrToUpper
module-attribute
¤
StrToUpper = BeforeValidator(
func=lambda x: strip() if isinstance(x, str) else x
)
StrPctToFloat
module-attribute
¤
StrPctToFloat = BeforeValidator(
func=lambda x: (
float(replace("%", "e-2"))
if isinstance(x, str) and endswith("%")
else x
)
)
PyUserWhitelistedKeys
module-attribute
¤
PyUserWhitelistedKeys = Literal[
"game_id",
"game_name",
"game_mode",
"wear_training",
"repair_training",
"l_training",
"h_training",
"fuel_training",
"co2_training",
"fuel_price",
"co2_price",
"accumulated_count",
"load",
"cargo_load",
"income_loss_tol",
"fourx",
]
PyUser
¤
Bases: BaseModel
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
|
username |
str
|
|
game_id |
int
|
|
game_name |
str
|
|
game_mode |
Literal['EASY', 'REALISM']
|
|
discord_id |
int
|
|
wear_training |
int
|
|
repair_training |
int
|
|
l_training |
int
|
|
h_training |
int
|
|
fuel_training |
int
|
|
co2_training |
int
|
|
fuel_price |
int
|
|
co2_price |
int
|
|
accumulated_count |
int
|
|
load |
float
|
|
cargo_load |
float
|
|
income_loss_tol |
float
|
|
fourx |
bool
|
|
role |
Literal['BANNED', 'USER', 'TRUSTED_USER', 'HIGHLY_TRUSTED_USER', 'TOP_ALLIANCE_MEMBER', 'TOP_ALLIANCE_ADMIN', 'HELPER', 'MODERATOR', 'ADMIN', 'SUPERUSER']
|
|
valid |
bool
|
|
route
¤
Classes:
Name | Description |
---|---|
PyRoute |
|
PyACRouteStopover |
|
PyACRouteStopoverNonExistent |
|
PyACRoute |
|
Attributes:
Name | Type | Description |
---|---|---|
PyACROptionsConfigAlgorithm |
|
|
PyACROptionsMaxDistance |
|
|
PyACROptionsMaxFlightTime |
|
|
PyACROptionsTPDMode |
|
|
PyACROptionsTripsPerDayPerAC |
|
|
PyACROptionsSortBy |
|
PyACROptionsConfigAlgorithm
module-attribute
¤
PyACROptionsConfigAlgorithm = Literal[
PyConfigAlgorithmPax, PyConfigAlgorithmCargo
]
PyACROptionsTPDMode
module-attribute
¤
PyACROptionsTPDMode = Literal[
"AUTO", "STRICT_ALLOW_MULTIPLE_AC", "STRICT"
]
PyRoute
¤
PyACRouteStopover
¤
PyACRouteStopoverNonExistent
¤
PyACRoute
¤
Bases: BaseModel
Attributes:
Name | Type | Description |
---|---|---|
route |
PyRoute
|
|
config |
Optional[PyPaxConfig | PyCargoConfig]
|
|
trips_per_day_per_ac |
Optional[int]
|
|
ticket |
Optional[PyPaxTicket | PyCargoTicket | PyVIPTicket]
|
|
max_income |
Optional[float]
|
|
income |
Optional[float]
|
|
fuel |
Optional[float]
|
|
co2 |
Optional[float]
|
|
acheck_cost |
Optional[float]
|
|
repair_cost |
Optional[float]
|
|
flight_time |
Optional[float]
|
|
num_ac |
Optional[int]
|
|
needs_stopover |
Optional[bool]
|
|
profit |
Optional[float]
|
|
contribution |
Optional[float]
|
|
ci |
Optional[int]
|
|
stopover |
Optional[PyACRouteStopover | PyACRouteStopoverNonExistent]
|
|
warnings |
list[Literal['ERR_DISTANCE_ABOVE_SPECIFIED', 'ERR_DISTANCE_TOO_LONG', 'ERR_DISTANCE_TOO_SHORT', 'REDUCED_CONTRIBUTION', 'ERR_NO_STOPOVER', 'ERR_FLIGHT_TIME_ABOVE_SPECIFIED', 'ERR_INSUFFICIENT_DEMAND', 'ERR_TRIPS_PER_DAY_TOO_HIGH']]
|
|
valid |
Optional[bool]
|
|
max_tpd |
Optional[int]
|
|
trips_per_day_per_ac
class-attribute
instance-attribute
¤
ticket
class-attribute
instance-attribute
¤
ticket: Optional[
PyPaxTicket | PyCargoTicket | PyVIPTicket
] = None
stopover
class-attribute
instance-attribute
¤
stopover: Optional[
PyACRouteStopover | PyACRouteStopoverNonExistent
] = None
ticket
¤
util
¤
Functions:
Name | Description |
---|---|
assert_equal_property_names |
|
user
¤
Classes:
Name | Description |
---|---|
UserExtra |
|
UserAPI |
|
Attributes:
Name | Type | Description |
---|---|---|
DBMessageUser |
|
UserExtra
¤
Bases: BaseModel
Attributes:
Name | Type | Description |
---|---|---|
collectionId |
str
|
|
collectionName |
str
|
|
created |
datetime
|
|
email |
str | None
|
|
emailVisibility |
bool
|
|
metadata |
dict | None
|
|
updated |
datetime
|
|
verified |
bool
|
|
model_config |
|
UserAPI
¤
UserAPI(client: AsyncClient)
Bases: BaseService
Methods:
Name | Description |
---|---|
get_from_discord |
|
update_setting |
|
Attributes:
Name | Type | Description |
---|---|---|
client |
|