nsarchive 3.0.0a1__py3-none-any.whl → 3.0.0a3__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.
- nsarchive/__init__.py +2 -5
- nsarchive/cls/base.py +131 -81
- nsarchive/cls/entities.py +175 -112
- nsarchive/instances/_economy.py +51 -8
- nsarchive/instances/_entities.py +60 -166
- nsarchive/instances/_republic.py +33 -7
- {nsarchive-3.0.0a1.dist-info → nsarchive-3.0.0a3.dist-info}/METADATA +1 -2
- nsarchive-3.0.0a3.dist-info/RECORD +15 -0
- nsarchive/cls/exceptions.py +0 -25
- nsarchive-3.0.0a1.dist-info/RECORD +0 -16
- {nsarchive-3.0.0a1.dist-info → nsarchive-3.0.0a3.dist-info}/LICENSE +0 -0
- {nsarchive-3.0.0a1.dist-info → nsarchive-3.0.0a3.dist-info}/WHEEL +0 -0
nsarchive/instances/_entities.py
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
from supabase import create_client
|
2
|
-
|
3
1
|
from ..cls.base import *
|
4
2
|
from ..cls.entities import *
|
5
|
-
from ..cls.archives import *
|
6
3
|
|
7
|
-
from ..cls
|
4
|
+
from ..cls import entities # Pour les default_headers
|
8
5
|
|
9
6
|
class EntityInstance(Instance):
|
10
7
|
"""
|
@@ -18,20 +15,24 @@ class EntityInstance(Instance):
|
|
18
15
|
- Sanctions et modifications d'une entité: `.Action[ .AdminAction | .Sanction ]`
|
19
16
|
"""
|
20
17
|
|
21
|
-
def __init__(self,
|
22
|
-
super().__init__(
|
18
|
+
def __init__(self, url: str, token: str = None) -> None:
|
19
|
+
super().__init__(url, token)
|
20
|
+
|
21
|
+
entities.default_headers = self.default_headers
|
23
22
|
|
24
23
|
"""
|
25
24
|
---- ENTITÉS ----
|
26
25
|
"""
|
27
26
|
|
28
|
-
def get_entity(self, id: NSID) -> User | Organization | Entity:
|
27
|
+
def get_entity(self, id: NSID, _class: str = None) -> User | Organization | Entity:
|
29
28
|
"""
|
30
29
|
Fonction permettant de récupérer le profil public d'une entité.\n
|
31
30
|
|
32
31
|
## Paramètres
|
33
|
-
id: `NSID
|
32
|
+
id: `NSID`
|
34
33
|
ID héxadécimal de l'entité à récupérer
|
34
|
+
_class: `str`
|
35
|
+
Classe du modèle à prendre (`.User` ou `.Organization`)
|
35
36
|
|
36
37
|
## Renvoie
|
37
38
|
- `.User` dans le cas où l'entité choisie est un membre
|
@@ -41,56 +42,34 @@ class EntityInstance(Instance):
|
|
41
42
|
|
42
43
|
id = NSID(id)
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
_data = self._get_by_ID('organizations', id)
|
45
|
+
if _class == "user":
|
46
|
+
_data = self._get_by_ID('individuals', id)
|
47
|
+
elif _class == "group":
|
48
|
+
_data = self._get_by_ID('organizations', id)
|
48
49
|
else:
|
49
|
-
_data
|
50
|
+
_data = self._get_by_ID('entities', id)
|
50
51
|
|
51
52
|
if _data is None: # ID inexistant chez les entités
|
52
53
|
return None
|
53
|
-
elif
|
54
|
+
elif "xp" in _data.keys():
|
55
|
+
_data['_type'] = 'user'
|
56
|
+
elif "members" in _data.keys():
|
54
57
|
_data['_type'] = 'organization'
|
58
|
+
else:
|
59
|
+
_data['_type'] = 'entity'
|
55
60
|
|
56
61
|
if _data['_type'] == 'user':
|
57
62
|
entity = User(id)
|
63
|
+
entity._url = f"{self.url}/model/individuals/{id}"
|
58
64
|
|
59
|
-
entity.
|
60
|
-
entity.boosts = _data['boosts']
|
61
|
-
|
62
|
-
entity.votes = [ NSID(vote) for vote in _data['votes'] ]
|
65
|
+
entity._load(_data)
|
63
66
|
elif _data['_type'] == 'organization':
|
64
67
|
entity = Organization(id)
|
68
|
+
entity._url = f"{self.url}/model/organizations/{id}"
|
69
|
+
entity.owner = self.get_entity(_data["owner_id"])
|
65
70
|
|
66
|
-
entity.
|
67
|
-
|
68
|
-
for _member in _data['members']:
|
69
|
-
member = GroupMember(_member['id'])
|
70
|
-
member.permission_level = _member['position']
|
71
|
-
|
72
|
-
_member_profile = self.get_entity(member.id)
|
73
|
-
|
74
|
-
member.set_name(_member_profile.name)
|
75
|
-
member.position = _member_profile.position
|
76
|
-
member.registerDate = _member_profile.registerDate
|
77
|
-
|
78
|
-
member.xp = _member_profile.xp
|
79
|
-
member.boosts = _member_profile.boosts
|
80
|
-
|
81
|
-
member.permissions = _member_profile.permissions
|
82
|
-
member.votes = _member_profile.votes
|
83
|
-
|
84
|
-
entity.append(member)
|
85
|
-
|
86
|
-
entity.parts = []
|
87
|
-
|
88
|
-
for owner, attrs in _data['parts'].items():
|
89
|
-
entity.parts.extend(attrs['count'] * [ Share(NSID(owner), attrs['worth'] // attrs['count']) ])
|
90
|
-
|
91
|
-
entity.certifications = _data['certifications']
|
92
|
-
entity.avatar = self._download_from_storage('organizations', f"avatars/{entity.id}")
|
93
|
-
else:
|
71
|
+
entity._load(_data)
|
72
|
+
else:
|
94
73
|
entity = Entity(id)
|
95
74
|
|
96
75
|
entity.name = _data['name']
|
@@ -99,12 +78,22 @@ class EntityInstance(Instance):
|
|
99
78
|
|
100
79
|
for key, value in _data.get('additional', {}).items():
|
101
80
|
if isinstance(value, str) and value.startswith('\n'):
|
102
|
-
entity.
|
81
|
+
entity.additional[key] = int(value[1:])
|
103
82
|
else:
|
104
|
-
entity.
|
83
|
+
entity.additional[key] = value
|
105
84
|
|
106
85
|
return entity
|
107
86
|
|
87
|
+
def get_entity_groups(self, entity: User) -> list[Organization]:
|
88
|
+
print(entity._url)
|
89
|
+
res = requests.get(f"{entity._url}/groups", headers = self.default_headers)
|
90
|
+
|
91
|
+
if res.status_code == 200:
|
92
|
+
return res.json()
|
93
|
+
else:
|
94
|
+
res.raise_for_status()
|
95
|
+
return []
|
96
|
+
|
108
97
|
def save_entity(self, entity: Entity):
|
109
98
|
"""
|
110
99
|
Fonction permettant de créer ou modifier une entité.
|
@@ -134,23 +123,32 @@ class EntityInstance(Instance):
|
|
134
123
|
_data['owner_id'] = NSID(entity.owner.id) if entity.owner else NSID("0")
|
135
124
|
_data['members'] = []
|
136
125
|
_data['certifications'] = entity.certifications
|
137
|
-
_data['parts'] = entity.get_shares(True)
|
138
126
|
|
139
127
|
for member in entity.members:
|
140
128
|
_member = {
|
141
129
|
'id': NSID(member.id),
|
142
|
-
'
|
130
|
+
'level': member.permission_level
|
143
131
|
}
|
144
132
|
|
145
133
|
_data['members'] += [_member]
|
146
134
|
|
147
|
-
|
135
|
+
entity.save_avatar()
|
148
136
|
elif type(entity) == User:
|
149
137
|
_data['xp'] = entity.xp
|
150
138
|
_data['boosts'] = entity.boosts
|
151
139
|
_data['votes'] = [ NSID(vote) for vote in entity.votes]
|
140
|
+
else:
|
141
|
+
return
|
142
|
+
|
143
|
+
self._put_in_db(
|
144
|
+
f"/new_model/{'individuals' if isinstance(entity, User) else 'organizations'}?id={urllib.parse.quote(entity.id)}&name={urllib.parse.quote(entity.name)}",
|
145
|
+
_data,
|
146
|
+
headers = self.default_headers,
|
147
|
+
use_PUT = True
|
148
|
+
)
|
149
|
+
|
150
|
+
entity._url = f"{self.url}/model/{'individuals' if isinstance(entity, User) else 'organizations'}/{entity.id}"
|
152
151
|
|
153
|
-
self._put_in_db('individuals' if isinstance(entity, User) else 'organizations', _data)
|
154
152
|
|
155
153
|
def delete_entity(self, entity: Entity):
|
156
154
|
"""
|
@@ -161,14 +159,17 @@ class EntityInstance(Instance):
|
|
161
159
|
L'entité à supprimer
|
162
160
|
"""
|
163
161
|
|
164
|
-
|
162
|
+
res = requests.post(f"{entity._url}/delete", headers = self.default_headers,)
|
163
|
+
|
164
|
+
if res.status_code != 200:
|
165
|
+
res.raise_for_status()
|
165
166
|
|
166
167
|
def fetch_entities(self, **query: typing.Any) -> list[ Entity | User | Organization ]:
|
167
168
|
"""
|
168
169
|
Récupère une liste d'entités en fonction d'une requête.
|
169
170
|
|
170
171
|
## Paramètres
|
171
|
-
query:
|
172
|
+
query: `**dict`\n
|
172
173
|
La requête pour filtrer les entités.
|
173
174
|
|
174
175
|
## Renvoie
|
@@ -184,43 +185,12 @@ class EntityInstance(Instance):
|
|
184
185
|
_res = self.fetch('organizations', **query)
|
185
186
|
else:
|
186
187
|
del query["_type"]
|
187
|
-
_res = self.fetch('
|
188
|
-
_res.extend(self.fetch('organizations', **query))
|
188
|
+
_res = self.fetch('entities', **query)
|
189
189
|
else:
|
190
|
-
_res = self.fetch('
|
191
|
-
_res.extend(self.fetch('organizations', **query))
|
190
|
+
_res = self.fetch('entities', **query)
|
192
191
|
|
193
192
|
return [ self.get_entity(NSID(entity['id'])) for entity in _res if entity is not None ]
|
194
193
|
|
195
|
-
def get_entity_groups(self, id: NSID) -> list[Organization]:
|
196
|
-
"""
|
197
|
-
Récupère les groupes auxquels appartient une entité.
|
198
|
-
|
199
|
-
## Paramètres
|
200
|
-
id: `NSID`\n
|
201
|
-
ID de l'entité.
|
202
|
-
|
203
|
-
## Renvoie
|
204
|
-
- `list[.Organization]`
|
205
|
-
"""
|
206
|
-
|
207
|
-
id = NSID(id)
|
208
|
-
_groups = self.fetch_entities(_type = 'organization')
|
209
|
-
groups = []
|
210
|
-
|
211
|
-
for group in _groups:
|
212
|
-
if group is None:
|
213
|
-
continue
|
214
|
-
|
215
|
-
if group.owner.id == id:
|
216
|
-
groups.append(group)
|
217
|
-
|
218
|
-
for member in group.members:
|
219
|
-
if member.id == id:
|
220
|
-
groups.append(group)
|
221
|
-
|
222
|
-
return [ group for group in groups ]
|
223
|
-
|
224
194
|
def get_position(self, id: str) -> Position:
|
225
195
|
"""
|
226
196
|
Récupère une position légale (métier, domaine professionnel).
|
@@ -239,83 +209,7 @@ class EntityInstance(Instance):
|
|
239
209
|
return None
|
240
210
|
|
241
211
|
position = Position(id)
|
242
|
-
position.name = _data['
|
243
|
-
position.permissions.
|
244
|
-
|
245
|
-
return position
|
246
|
-
|
247
|
-
"""
|
248
|
-
---- ARCHIVES --
|
249
|
-
"""
|
250
|
-
|
251
|
-
def _add_archive(self, archive: Archive):
|
252
|
-
"""
|
253
|
-
Ajoute une archive d'une action (modification au sein d'un groupe ou sanction) dans la base de données.
|
254
|
-
|
255
|
-
## Paramètres
|
256
|
-
- archive: `.Archive`\n
|
257
|
-
Archive à ajouter
|
258
|
-
"""
|
259
|
-
|
260
|
-
archive.id = NSID(archive.id)
|
261
|
-
archive.author = NSID(archive.author)
|
262
|
-
archive.target = NSID(archive.target)
|
263
|
-
|
264
|
-
_data = archive.__dict__.copy()
|
265
|
-
|
266
|
-
if type(archive) == Sanction:
|
267
|
-
_data['_type'] = "sanction"
|
268
|
-
elif type(archive) == Report:
|
269
|
-
_data['_type'] = "report"
|
270
|
-
else:
|
271
|
-
_data['_type'] = "action"
|
272
|
-
|
273
|
-
self._put_in_db('archives', _data)
|
274
|
-
|
275
|
-
def _get_archive(self, id: NSID) -> Archive | Sanction:
|
276
|
-
"""
|
277
|
-
Récupère une archive spécifique.
|
278
|
-
|
279
|
-
## Paramètres
|
280
|
-
id: `NSID`\n
|
281
|
-
ID de l'archive.
|
282
|
-
|
283
|
-
## Renvoie
|
284
|
-
- `.Archive | .Sanction `
|
285
|
-
"""
|
286
|
-
|
287
|
-
id = NSID(id)
|
288
|
-
_data = self._get_by_ID('archives', id)
|
289
|
-
|
290
|
-
if _data is None:
|
291
|
-
return None
|
292
|
-
|
293
|
-
if _data['_type'] == "sanction": # Mute, ban, GAV, kick, détention, prune (xp seulement)
|
294
|
-
archive = Sanction(_data['author'], _data['target'])
|
295
|
-
elif _data['_type'] == "report": # Plainte
|
296
|
-
archive = Report(_data['author'], _data['target'])
|
297
|
-
else:
|
298
|
-
archive = Archive(_data['author'], _data['target'])
|
299
|
-
|
300
|
-
archive.id = id
|
301
|
-
archive.date = _data['date']
|
302
|
-
archive.action = _data['action']
|
303
|
-
archive.details = _data['details']
|
304
|
-
|
305
|
-
return archive
|
306
|
-
|
307
|
-
def _fetch_archives(self, **query) -> list[ Archive | Sanction ]:
|
308
|
-
"""
|
309
|
-
Récupère une liste d'archives correspondant à la requête.
|
310
|
-
|
311
|
-
## Paramètres
|
312
|
-
query: `dict`\n
|
313
|
-
Requête pour filtrer les archives.
|
314
|
-
|
315
|
-
## Renvoie
|
316
|
-
- `list[.Archive | .Sanction]`
|
317
|
-
"""
|
318
|
-
|
319
|
-
_res = self.fetch('archives', **query)
|
212
|
+
position.name = _data['name']
|
213
|
+
position.permissions.merge(_data['permissions'])
|
320
214
|
|
321
|
-
return
|
215
|
+
return position
|
nsarchive/instances/_republic.py
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
import time
|
2
2
|
|
3
|
-
from supabase import create_client
|
4
|
-
|
5
3
|
from ..cls.base import *
|
6
4
|
from ..cls.archives import *
|
7
5
|
from ..cls.republic import *
|
8
6
|
|
9
|
-
from ..cls.exceptions import *
|
10
|
-
|
11
7
|
|
12
8
|
class RepublicInstance(Instance):
|
13
9
|
"""
|
10
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
14
11
|
Gère les interactions avec les votes, les archives de la république, et les fonctionnaires.
|
15
12
|
|
16
13
|
## Informations
|
@@ -19,8 +16,8 @@ class RepublicInstance(Instance):
|
|
19
16
|
- Occupants des différents rôles et historique de leurs actions: `.Official`
|
20
17
|
"""
|
21
18
|
|
22
|
-
def __init__(self,
|
23
|
-
super().__init__(
|
19
|
+
def __init__(self, url: str, token: str) -> None:
|
20
|
+
super().__init__(url, token)
|
24
21
|
|
25
22
|
"""
|
26
23
|
---- VOTES & REFERENDUMS ----
|
@@ -28,6 +25,7 @@ class RepublicInstance(Instance):
|
|
28
25
|
|
29
26
|
def get_vote(self, id: NSID) -> Vote | Referendum | Lawsuit:
|
30
27
|
"""
|
28
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
31
29
|
Récupère un vote spécifique.
|
32
30
|
|
33
31
|
## Paramètres
|
@@ -38,6 +36,8 @@ class RepublicInstance(Instance):
|
|
38
36
|
- `.Vote | .Referendum | .Lawsuit`
|
39
37
|
"""
|
40
38
|
|
39
|
+
return Vote(NSID(id), "Vote Inconnu") # Provisoire
|
40
|
+
|
41
41
|
id = NSID(id)
|
42
42
|
_data = self._get_by_ID('votes', id)
|
43
43
|
|
@@ -74,6 +74,7 @@ class RepublicInstance(Instance):
|
|
74
74
|
|
75
75
|
def save_vote(self, vote: Vote | Referendum | Lawsuit):
|
76
76
|
"""
|
77
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
77
78
|
Sauvegarde un vote dans la base de données.
|
78
79
|
|
79
80
|
## Paramètres
|
@@ -81,6 +82,8 @@ class RepublicInstance(Instance):
|
|
81
82
|
Vote à sauvegarder
|
82
83
|
"""
|
83
84
|
|
85
|
+
return # Provisoire
|
86
|
+
|
84
87
|
vote.id = NSID(vote.id)
|
85
88
|
|
86
89
|
_data = {
|
@@ -110,6 +113,7 @@ class RepublicInstance(Instance):
|
|
110
113
|
|
111
114
|
def get_official(self, id: NSID, current_mandate: bool = True) -> Official:
|
112
115
|
"""
|
116
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
113
117
|
Récupère les informations d'un fonctionnaire (mandats, contributions).
|
114
118
|
|
115
119
|
## Paramètres
|
@@ -122,6 +126,8 @@ class RepublicInstance(Instance):
|
|
122
126
|
- `.Official`
|
123
127
|
"""
|
124
128
|
|
129
|
+
return Official(NSID(id)) # Provisoire
|
130
|
+
|
125
131
|
id = NSID(id)
|
126
132
|
|
127
133
|
base = 'mandate' if current_mandate else 'archives'
|
@@ -149,7 +155,12 @@ class RepublicInstance(Instance):
|
|
149
155
|
return user
|
150
156
|
|
151
157
|
def get_institutions(self) -> State:
|
152
|
-
"""
|
158
|
+
"""
|
159
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
160
|
+
Récupère l'état actuel des institutions de la république.
|
161
|
+
"""
|
162
|
+
|
163
|
+
return State()
|
153
164
|
|
154
165
|
admin = Administration()
|
155
166
|
gov = Government(Official('0'))
|
@@ -192,6 +203,7 @@ class RepublicInstance(Instance):
|
|
192
203
|
|
193
204
|
def update_institutions(self, institutions: State):
|
194
205
|
"""
|
206
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
195
207
|
Fonction communément appelée après un vote législatif ou une nomination.\n
|
196
208
|
Celle-ci met à jour: Le gouvernement (président, ministres), les différents députés et leur président, les différents juges, les différents policiers.\n
|
197
209
|
|
@@ -200,6 +212,8 @@ class RepublicInstance(Instance):
|
|
200
212
|
Le nouvel état des institutions, à sauvegarder.
|
201
213
|
"""
|
202
214
|
|
215
|
+
return # Provisoire
|
216
|
+
|
203
217
|
get_ids = lambda institution : [ member.id for member in institutions.__getattribute__(institution).members ]
|
204
218
|
|
205
219
|
self._put_in_db('functions', { 'id': 'ADMIN', 'users': get_ids('administration') })
|
@@ -219,6 +233,7 @@ class RepublicInstance(Instance):
|
|
219
233
|
|
220
234
|
def new_mandate(self, institutions: State, weeks: int = 4):
|
221
235
|
"""
|
236
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
222
237
|
Fonction qui amène à supprimer toutes les archives du mandat précédent
|
223
238
|
|
224
239
|
## Paramètres
|
@@ -228,6 +243,8 @@ class RepublicInstance(Instance):
|
|
228
243
|
Nombre de semaines du mandat
|
229
244
|
"""
|
230
245
|
|
246
|
+
return # Provisoire
|
247
|
+
|
231
248
|
for item in self.fetch('mandate'):
|
232
249
|
if item['date'] >= round(time.time()) - weeks * 604800: # On évite de supprimer les informations écrites lors de la période définie
|
233
250
|
self._delete_by_ID('mandate', item['id'])
|
@@ -240,6 +257,7 @@ class RepublicInstance(Instance):
|
|
240
257
|
|
241
258
|
def _add_archive(self, archive: Archive):
|
242
259
|
"""
|
260
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
243
261
|
Ajoute une archive d'une action (élection, promotion, ou rétrogradation) dans la base de données.
|
244
262
|
|
245
263
|
## Paramètres
|
@@ -247,6 +265,8 @@ class RepublicInstance(Instance):
|
|
247
265
|
Archive à ajouter
|
248
266
|
"""
|
249
267
|
|
268
|
+
return # Provisoire
|
269
|
+
|
250
270
|
archive.id = NSID(archive.id)
|
251
271
|
_data = archive.__dict__.copy()
|
252
272
|
|
@@ -264,6 +284,7 @@ class RepublicInstance(Instance):
|
|
264
284
|
|
265
285
|
def _get_archive(self, id: NSID) -> Archive | Election | Promotion | Demotion:
|
266
286
|
"""
|
287
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
267
288
|
Récupère une archive spécifique.
|
268
289
|
|
269
290
|
## Paramètres
|
@@ -274,6 +295,8 @@ class RepublicInstance(Instance):
|
|
274
295
|
- `.Archive | .Election | .Promotion | .Demotion`
|
275
296
|
"""
|
276
297
|
|
298
|
+
return Archive(NSID(id)) # Provisoire
|
299
|
+
|
277
300
|
id = NSID(id)
|
278
301
|
_data = self._get_by_ID('archives', id)
|
279
302
|
|
@@ -298,6 +321,7 @@ class RepublicInstance(Instance):
|
|
298
321
|
|
299
322
|
def _fetch_archives(self, **query) -> list[ Archive | Election | Promotion | Demotion ]:
|
300
323
|
"""
|
324
|
+
*INDISPONIBLE DANS CETTE VERSION.*\n
|
301
325
|
Récupère une liste d'archives correspondant à la requête.
|
302
326
|
|
303
327
|
## Paramètres
|
@@ -308,6 +332,8 @@ class RepublicInstance(Instance):
|
|
308
332
|
- `list[.Archive | .Election | .Promotion | .Demotion]`
|
309
333
|
"""
|
310
334
|
|
335
|
+
return [] # Provisoire
|
336
|
+
|
311
337
|
_res = self.fetch('archives', **query)
|
312
338
|
|
313
339
|
return [ self._get_archive(archive['id']) for archive in _res ]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nsarchive
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.0a3
|
4
4
|
Summary: API-wrapper pour récupérer des données liées à Nation
|
5
5
|
License: GPL-3.0
|
6
6
|
Author: happex
|
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3.10
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
14
14
|
Requires-Dist: pillow (>=10.4,<11.0)
|
15
|
-
Requires-Dist: supabase (>=2.9.1,<3.0.0)
|
16
15
|
Description-Content-Type: text/markdown
|
17
16
|
|
18
17
|
# NSArchive
|
@@ -0,0 +1,15 @@
|
|
1
|
+
nsarchive/__init__.py,sha256=LWKDYsLX7xQqoST4Tglk1n9dIGAIdfxy18agMBN3dTw,656
|
2
|
+
nsarchive/assets/default_avatar.png,sha256=n-4vG_WPke8LvbY3ZU6oA-H-OtRoIu7woKnRq9DCIlI,51764
|
3
|
+
nsarchive/cls/archives.py,sha256=3vyGOBZUE-B-G_QMJXRIPD0d-1O5z4wqv-2MRf5AQdA,2506
|
4
|
+
nsarchive/cls/base.py,sha256=R6ZD2_DVOvjTO6VZ0HteFWVmdW9fieyIpGF9P0PqYk4,7424
|
5
|
+
nsarchive/cls/economy.py,sha256=soe3ATrtQem-u80vz8nXfsn_3TqMdhpolyTxRenH2C0,2742
|
6
|
+
nsarchive/cls/entities.py,sha256=TUNnQkhAqkwMZtXXq0-t5tBHSrwH7IPXbx7nvHaYX10,13612
|
7
|
+
nsarchive/cls/republic.py,sha256=16NFNCkJxOeVRd6BoJ68AlrTESQgRfZ5FSFlNWTEdK0,4103
|
8
|
+
nsarchive/instances/_economy.py,sha256=kVIbsCIrctV5yA3nlnSEYkJ8Cuh74YnQKtntIXTqOY0,8892
|
9
|
+
nsarchive/instances/_entities.py,sha256=Q9KLFqcr4r4cHlHXd1pZxvqLnu4o0R8UvkZpyjY5ZWE,7305
|
10
|
+
nsarchive/instances/_republic.py,sha256=M8k2rZJvQGzOyZlmqRDiB-d615hZOqD3kuRrgYP4JqA,12004
|
11
|
+
nsarchive/utils.py,sha256=qpQCZLlbVApOLtCI2ml54QwUld6K8fDxyBfwzofqXzw,610
|
12
|
+
nsarchive-3.0.0a3.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
|
13
|
+
nsarchive-3.0.0a3.dist-info/METADATA,sha256=y4iV2MiQvGewXHSdXEImGdlQhlgivro0IqpIjAoBgzU,657
|
14
|
+
nsarchive-3.0.0a3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
15
|
+
nsarchive-3.0.0a3.dist-info/RECORD,,
|
nsarchive/cls/exceptions.py
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# Exceptions liées aux entités
|
2
|
-
|
3
|
-
class NameTooLongError(Exception):
|
4
|
-
def __init__(self, *args: object) -> None:
|
5
|
-
super().__init__(*args)
|
6
|
-
|
7
|
-
class EntityTypeError(Exception):
|
8
|
-
def __init__(self, *args: object) -> None:
|
9
|
-
super().__init__(*args)
|
10
|
-
|
11
|
-
class AvatarTooLongError(Exception):
|
12
|
-
def __init__(self, *args: object) -> None:
|
13
|
-
super().__init__(*args)
|
14
|
-
|
15
|
-
# Exceptions pour le vote
|
16
|
-
|
17
|
-
class AlreadyVotedError(Exception):
|
18
|
-
def __init__(self, *args: object) -> None:
|
19
|
-
super().__init__(*args)
|
20
|
-
|
21
|
-
# Ressource pas trouvée
|
22
|
-
|
23
|
-
class RessourceNotFoundError(Exception):
|
24
|
-
def __init__(self, *args: object) -> None:
|
25
|
-
super().__init__(*args)
|
@@ -1,16 +0,0 @@
|
|
1
|
-
nsarchive/__init__.py,sha256=_hwIocDyD7R-4rS7ypca8jZex93H6mK-b9NpTpt-Rvo,724
|
2
|
-
nsarchive/assets/default_avatar.png,sha256=n-4vG_WPke8LvbY3ZU6oA-H-OtRoIu7woKnRq9DCIlI,51764
|
3
|
-
nsarchive/cls/archives.py,sha256=3vyGOBZUE-B-G_QMJXRIPD0d-1O5z4wqv-2MRf5AQdA,2506
|
4
|
-
nsarchive/cls/base.py,sha256=7gbXtKZaqkr8NWf-0oZaZ0alR9JSx_G1Qf7Sbn-MbF0,5611
|
5
|
-
nsarchive/cls/economy.py,sha256=soe3ATrtQem-u80vz8nXfsn_3TqMdhpolyTxRenH2C0,2742
|
6
|
-
nsarchive/cls/entities.py,sha256=fAxn4V64dqoB1wq7t-kByARlrr_jKzPzqpvFO_ECXnI,10144
|
7
|
-
nsarchive/cls/exceptions.py,sha256=QN6Qn7cxTkGoC4lO50hBAq4gZCgo7scQvCkb-xKl6Xs,692
|
8
|
-
nsarchive/cls/republic.py,sha256=16NFNCkJxOeVRd6BoJ68AlrTESQgRfZ5FSFlNWTEdK0,4103
|
9
|
-
nsarchive/instances/_economy.py,sha256=trReX8u5QrgcYm6RElV-gNjVyFbZWO783XTDMm9JJj4,7777
|
10
|
-
nsarchive/instances/_entities.py,sha256=AmpnXz1penQz09bhnErK8QKU6WnVwGwc3txkHc-OFfY,10635
|
11
|
-
nsarchive/instances/_republic.py,sha256=5cOihYch6n2dyYAqiNYMdwerwcyZ9Y80f5cRtvkiH-o,11289
|
12
|
-
nsarchive/utils.py,sha256=qpQCZLlbVApOLtCI2ml54QwUld6K8fDxyBfwzofqXzw,610
|
13
|
-
nsarchive-3.0.0a1.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
|
14
|
-
nsarchive-3.0.0a1.dist-info/METADATA,sha256=SYHycWCpFIu2_B6EuFSoaNSyziz6__EwF9dxWWVSQhg,698
|
15
|
-
nsarchive-3.0.0a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
16
|
-
nsarchive-3.0.0a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|