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

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.

Files for koishi, version 1.1.6
Filename, size File type Python version Upload date Hashes
Filename, size koishi-1.1.6-py3-none-any.whl (11.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size koishi-1.1.6.tar.gz (11.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page