-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Martin Landa edited this page Nov 4, 2021
·
27 revisions
gen = genererujCenoveUdajeDleKU(username, passwd)
gen.paramaters = { 'ku': 73892, 'rok': 2020, 'mesic_od': 1, 'mesic_do': 3 }
@property
def parameters(self):
...
# or
gen.get_paramaters_from_file('params.json')
{
'ku': 73892,
'rok': 2020,
'mesic_od: 1,
'mesic_do: 2
}
id = gen.process() # -> raise exception on error
sez = seznamSestav(username, passwd, id) -> raise exception on invalid id (?)
stav = sez.process() # -> raise exception on error
print(stav) # pouze pro informaci
vrat = vratSestavu(username, passwd, id)
stav = vrat.process()
print(stav)
vrat.write_output("/cesta/k/adresari") -> /cesta/k/adresari/id_mesic.csv
smaz = smazSestavu(username, passwd, id)
stav = smaz.process()
print(stav)
Note 1: input
[
"m+o3Qoxrit4ZwyJIPjx3X788EOgtJieiZYw/eqwxTPERjsqLramxBhGoAaAnooYAliQoVBYy7Q7fN2cVAxsAoUoPFaReqsfYWOZJjMBj/6Q=",
"\nmSH6sS5yv6vA2jEOtyHeXaXIJpC2m0Ai56aKzsVmEphUNyjFQYgC8MOLnu3+3Zugm8JQW2AJqEJYcSiqXdPbnb/03PKgyNkYWaS876wv0tg="
]
Note 2: write_output
cti = CtiOsCsv(user, passwd)
...
cti.write_output("/cesta/k/souboru.csv")
gen = genererujCenoveUdajeDleKU(username, passwd)
gen.paramaters = { 'ku': 73892, 'rok': 2020, 'mesic_od': 1, 'mesic_do': 3 }
stav1 = gen.seznamSestav() # -> self._id
# a. zauctovat
stav2 = gen.vratSestavu()
gen.write_output("...")
gen.smazSestavu()
# b. nezauctovat
gen.smazSestavu()
def __del__(self):
if not_deleted:
self.smazSestavu()