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.

Source Distribution

koishi-1.1.6.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

koishi-1.1.6-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

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

Hashes for koishi-1.1.6.tar.gz
Algorithm Hash digest
SHA256 26630341cf3c32bed26eb9ec2e81cd808f50608d02ef04fc160a0fa1e40a2197
MD5 fda9c518f9c36cf797a3a9d01244bff3
BLAKE2b-256 3d63b03c7e2200c59cb791d184ea9df6775d607bcb1414a5b9c6c2963aeed677

See more details on using hashes here.

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

Hashes for koishi-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 983685f74fa1de32f83c4788190778b7234d43eab475fe2dc0b9794c958cafd1
MD5 e04dad1b165544fc68ca7ff47d134b0c
BLAKE2b-256 a8a724f3647413bb43e822fe218ecfabd4aedad5e84bbbda189f669501c698ff

See more details on using hashes here.

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