fmsave 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. fmsave/__init__.py +194 -0
  2. fmsave/__main__.py +4 -0
  3. fmsave/_checks.py +2510 -0
  4. fmsave/_container.py +627 -0
  5. fmsave/_context.py +385 -0
  6. fmsave/_errors.py +52 -0
  7. fmsave/_frozen.py +43 -0
  8. fmsave/_layouts/__init__.py +2036 -0
  9. fmsave/_layouts/fm26_26_3_2.py +1488 -0
  10. fmsave/_package.py +8 -0
  11. fmsave/_reader_stats.py +729 -0
  12. fmsave/_save.py +2305 -0
  13. fmsave/_scan.py +195 -0
  14. fmsave/_status.py +179 -0
  15. fmsave/_version.py +248 -0
  16. fmsave/checks.py +38 -0
  17. fmsave/cli.py +1288 -0
  18. fmsave/export.py +1238 -0
  19. fmsave/models/__init__.py +138 -0
  20. fmsave/models/affiliates.py +57 -0
  21. fmsave/models/clubs.py +90 -0
  22. fmsave/models/common.py +72 -0
  23. fmsave/models/competitions.py +118 -0
  24. fmsave/models/contracts.py +309 -0
  25. fmsave/models/facilities.py +109 -0
  26. fmsave/models/finances.py +143 -0
  27. fmsave/models/fixtures.py +184 -0
  28. fmsave/models/injuries.py +180 -0
  29. fmsave/models/jobs.py +76 -0
  30. fmsave/models/league_tables.py +277 -0
  31. fmsave/models/managed.py +45 -0
  32. fmsave/models/matches.py +182 -0
  33. fmsave/models/meta.py +94 -0
  34. fmsave/models/players.py +566 -0
  35. fmsave/models/rules.py +251 -0
  36. fmsave/models/stadiums.py +131 -0
  37. fmsave/models/staff.py +286 -0
  38. fmsave/models/suspensions.py +149 -0
  39. fmsave/models/tactics.py +256 -0
  40. fmsave/models/training.py +153 -0
  41. fmsave/name_maps.py +186 -0
  42. fmsave/py.typed +0 -0
  43. fmsave/readers/__init__.py +1 -0
  44. fmsave/readers/_common.py +102 -0
  45. fmsave/readers/affiliates.py +121 -0
  46. fmsave/readers/clubs.py +618 -0
  47. fmsave/readers/competitions.py +281 -0
  48. fmsave/readers/contracts.py +1546 -0
  49. fmsave/readers/facilities.py +84 -0
  50. fmsave/readers/finances.py +460 -0
  51. fmsave/readers/fixtures.py +357 -0
  52. fmsave/readers/injuries.py +633 -0
  53. fmsave/readers/jobs.py +281 -0
  54. fmsave/readers/league_tables.py +595 -0
  55. fmsave/readers/managed.py +352 -0
  56. fmsave/readers/matches.py +601 -0
  57. fmsave/readers/names.py +178 -0
  58. fmsave/readers/persons.py +642 -0
  59. fmsave/readers/player_scan.py +440 -0
  60. fmsave/readers/players.py +536 -0
  61. fmsave/readers/results.py +425 -0
  62. fmsave/readers/rules.py +399 -0
  63. fmsave/readers/span.py +1068 -0
  64. fmsave/readers/stadiums.py +681 -0
  65. fmsave/readers/staff.py +1067 -0
  66. fmsave/readers/stages.py +374 -0
  67. fmsave/readers/suspensions.py +353 -0
  68. fmsave/readers/tactics.py +751 -0
  69. fmsave/readers/training.py +511 -0
  70. fmsave/table.py +441 -0
  71. fmsave-0.4.0.dist-info/METADATA +164 -0
  72. fmsave-0.4.0.dist-info/RECORD +75 -0
  73. fmsave-0.4.0.dist-info/WHEEL +4 -0
  74. fmsave-0.4.0.dist-info/entry_points.txt +3 -0
  75. fmsave-0.4.0.dist-info/licenses/LICENSE +21 -0
fmsave/__init__.py ADDED
@@ -0,0 +1,194 @@
1
+ """fmsave: read Football Manager 26 save files."""
2
+
3
+ from fmsave._errors import (
4
+ AmbiguousNameError,
5
+ CorruptSaveError,
6
+ FmsaveError,
7
+ FmsaveWarning,
8
+ NotAFmSaveError,
9
+ ReaderCheckError,
10
+ ReaderCheckWarning,
11
+ SaveChangedError,
12
+ SaveClosedError,
13
+ UnknownBuildWarning,
14
+ UnsupportedGameError,
15
+ )
16
+ from fmsave._package import __version__
17
+ from fmsave._save import Save
18
+ from fmsave._save import open_save as open
19
+ from fmsave._status import FieldStatus, field_status
20
+ from fmsave.checks import (
21
+ GateCheckError,
22
+ GateResult,
23
+ ReaderCheck,
24
+ ReaderStatus,
25
+ ReaderValidation,
26
+ ValidationReport,
27
+ validate_save,
28
+ )
29
+ from fmsave.models.affiliates import AffiliateGroup
30
+ from fmsave.models.clubs import Club, Team
31
+ from fmsave.models.common import CodedValue, ContractEndSource, TransferValueState
32
+ from fmsave.models.competitions import Competition, CompetitionRound, Stage
33
+ from fmsave.models.contracts import (
34
+ Clause,
35
+ ClauseKind,
36
+ Contract,
37
+ ContractChainEntry,
38
+ ContractType,
39
+ SquadStatus,
40
+ )
41
+ from fmsave.models.facilities import ClubFacilities, CorporateFacilities
42
+ from fmsave.models.finances import FinanceMonth, Sponsorship, SponsorType
43
+ from fmsave.models.fixtures import Fixture
44
+ from fmsave.models.injuries import (
45
+ InjuryCause,
46
+ InjuryRecord,
47
+ InjuryRecordKind,
48
+ InjurySeverity,
49
+ InjuryType,
50
+ )
51
+ from fmsave.models.jobs import JobVacancy
52
+ from fmsave.models.league_tables import (
53
+ LeagueTable,
54
+ LeagueTableMatch,
55
+ LeagueTableRow,
56
+ LeagueTableSplit,
57
+ MatchOutcome,
58
+ MatchSide,
59
+ )
60
+ from fmsave.models.managed import ManagedClub
61
+ from fmsave.models.matches import MatchPosition, PlayerMatchStats
62
+ from fmsave.models.meta import SaveInfo, SectionInfo
63
+ from fmsave.models.players import (
64
+ Ability,
65
+ Attributes,
66
+ Personality,
67
+ Player,
68
+ Positions,
69
+ Reputation,
70
+ Trait,
71
+ )
72
+ from fmsave.models.rules import (
73
+ CompetitionRules,
74
+ RulesBlockKind,
75
+ RulesRound,
76
+ TransferWindow,
77
+ )
78
+ from fmsave.models.stadiums import Stadium
79
+ from fmsave.models.staff import Staff, StaffAttributes, StaffList, StaffPreferences
80
+ from fmsave.models.suspensions import PlayerSuspension, Suspension, SuspensionScope
81
+ from fmsave.models.tactics import (
82
+ Mentality,
83
+ SetPieceRoutine,
84
+ Tactic,
85
+ TacticPosition,
86
+ TacticSettingUnit,
87
+ TacticSlot,
88
+ )
89
+ from fmsave.models.training import (
90
+ MentoringGroup,
91
+ TeamTraining,
92
+ TrainingSchedule,
93
+ TrainingWeek,
94
+ )
95
+ from fmsave.name_maps import read_competition_names
96
+ from fmsave.table import Table
97
+
98
+ OUTPUT_SCHEMA_VERSION = 2
99
+
100
+ __all__ = [
101
+ "OUTPUT_SCHEMA_VERSION",
102
+ "Ability",
103
+ "AffiliateGroup",
104
+ "AmbiguousNameError",
105
+ "Attributes",
106
+ "Clause",
107
+ "ClauseKind",
108
+ "Club",
109
+ "ClubFacilities",
110
+ "CodedValue",
111
+ "Competition",
112
+ "CompetitionRound",
113
+ "CompetitionRules",
114
+ "Contract",
115
+ "ContractChainEntry",
116
+ "ContractEndSource",
117
+ "ContractType",
118
+ "CorporateFacilities",
119
+ "CorruptSaveError",
120
+ "FieldStatus",
121
+ "FinanceMonth",
122
+ "Fixture",
123
+ "FmsaveError",
124
+ "FmsaveWarning",
125
+ "GateCheckError",
126
+ "GateResult",
127
+ "InjuryCause",
128
+ "InjuryRecord",
129
+ "InjuryRecordKind",
130
+ "InjurySeverity",
131
+ "InjuryType",
132
+ "JobVacancy",
133
+ "LeagueTable",
134
+ "LeagueTableMatch",
135
+ "LeagueTableRow",
136
+ "LeagueTableSplit",
137
+ "ManagedClub",
138
+ "MatchOutcome",
139
+ "MatchPosition",
140
+ "MatchSide",
141
+ "Mentality",
142
+ "MentoringGroup",
143
+ "NotAFmSaveError",
144
+ "Personality",
145
+ "Player",
146
+ "PlayerMatchStats",
147
+ "PlayerSuspension",
148
+ "Positions",
149
+ "ReaderCheck",
150
+ "ReaderCheckError",
151
+ "ReaderCheckWarning",
152
+ "ReaderStatus",
153
+ "ReaderValidation",
154
+ "Reputation",
155
+ "RulesBlockKind",
156
+ "RulesRound",
157
+ "Save",
158
+ "SaveChangedError",
159
+ "SaveClosedError",
160
+ "SaveInfo",
161
+ "SectionInfo",
162
+ "SetPieceRoutine",
163
+ "SponsorType",
164
+ "Sponsorship",
165
+ "SquadStatus",
166
+ "Stadium",
167
+ "Staff",
168
+ "StaffAttributes",
169
+ "StaffList",
170
+ "StaffPreferences",
171
+ "Stage",
172
+ "Suspension",
173
+ "SuspensionScope",
174
+ "Table",
175
+ "Tactic",
176
+ "TacticPosition",
177
+ "TacticSettingUnit",
178
+ "TacticSlot",
179
+ "Team",
180
+ "TeamTraining",
181
+ "TrainingSchedule",
182
+ "TrainingWeek",
183
+ "Trait",
184
+ "TransferValueState",
185
+ "TransferWindow",
186
+ "UnknownBuildWarning",
187
+ "UnsupportedGameError",
188
+ "ValidationReport",
189
+ "__version__",
190
+ "field_status",
191
+ "open",
192
+ "read_competition_names",
193
+ "validate_save",
194
+ ]
fmsave/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from fmsave.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())