Wrapper library for the unofficial scraped API of the satori testing system.
>>> from koishi import Koishi
>>> foo = Koishi("login", "password")
>>> foo[4]
<Contest 6460771 approved "Liga Informatyczna V LO, 2020/21">
>>> foo[4].problems
[<Problem 6629872 X1 Promocja>, <Problem 6629900 X2 Magazyn Prezentow>,
...
<Problem 6473321 PIZ Pizza>, <Problem 6473327 TRA Tramwaje>]
>>> foo[4][6]
<Problem 6501411 A01 Meteory>
>>> foo[4][6].submit("print(\"hehe\")", "py")
6851966
>>> foo[4].result
<Result 6851966 A01 2021-04-03 22:45:10 QUE>
>>> foo[4][6].submit("print(\"trolling\")",
... lang="py",
... callback=lambda x: print(x.src x.details.tests, sep="\n")
... )
print("trolling")
[ResultTest(name='0', status=<RStatus.ANS: 1>, time='0.004')]
$ pip install koishi
- MasFlam/SatoriCLI.jl - for helping with multipart problem submit requests.
- zielmicha/satori-cli - for inspiration / idea.
- plasticparakeet - Koishi Komeiji icon.
- Fork this repo
- Create your feature branch (
git checkout -b feature/foobar
) - Commit your changes (
git commit -am 'Add some foobar'
) - Push to the branch (
git push origin feature/foobar
) - Create a new Pull Request
koishi is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms and conditions of the MIT license.