Python wrapper for the unofficial scraped API of the satori testing system.
Project description
koishi.py
[Documentation] [Installation] [Testing] [Credits] [Contributing] [License]
Wrapper library for the unofficial scraped API of the satori testing system.
Example usage
>>> 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')]
installation
$ pip install koishi
Credits
- MasFlam/SatoriCLI.jl - for helping with multipart problem submit requests.
- zielmicha/satori-cli - for inspiration / idea.
- u/plasticparakeet - Koishi Komeiji icon.
Contributing
- 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
License
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
koishi-1.1.6.tar.gz
(11.5 kB
view details)
Built Distribution
koishi-1.1.6-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file koishi-1.1.6.tar.gz
.
File metadata
- Download URL: koishi-1.1.6.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26630341cf3c32bed26eb9ec2e81cd808f50608d02ef04fc160a0fa1e40a2197 |
|
MD5 | fda9c518f9c36cf797a3a9d01244bff3 |
|
BLAKE2b-256 | 3d63b03c7e2200c59cb791d184ea9df6775d607bcb1414a5b9c6c2963aeed677 |
File details
Details for the file koishi-1.1.6-py3-none-any.whl
.
File metadata
- Download URL: koishi-1.1.6-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 983685f74fa1de32f83c4788190778b7234d43eab475fe2dc0b9794c958cafd1 |
|
MD5 | e04dad1b165544fc68ca7ff47d134b0c |
|
BLAKE2b-256 | a8a724f3647413bb43e822fe218ecfabd4aedad5e84bbbda189f669501c698ff |