Skip to main content

Python wrapper for the unofficial scraped API of the satori testing system.

Project description

koishi.py

pypi version API endpoint coverage CodeFactor

[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

TODO: upload to pypi

Credits

Contributing

  1. Fork this repo
  2. Create your feature branch ( git checkout -b feature/foobar )
  3. Commit your changes         ( git commit -am 'Add some foobar' )
  4. Push to the branch              ( git push origin feature/foobar )
  5. 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


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.4.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

koishi-1.1.4-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page