Skip to main content

PYOJ - Python Offline Judge v1.0

1. Introduction

This package is a triute of a popular Python package unittest, but it is easier to use and have more language code to use. You can apply Django and this package to make a Online Judge

2. How to use

Download this package by using the code at the top in the terminal.

pip install pyoj

To import, create a Python file and type this first line:

import pyoj

Make a folder contains all the users' solution you wnat to check. Use this line

file = pyoj.setup(dir="")

Then, set the compiler you want to check, set the input type and output type as follow:

set_compiler("lang", "filename_you_want_to_compile")
set_io("input type: stdin, filein", "output type: stdout, fileout", "ext for input file if choose filein", "ext for output file if choose fileout")

Use execute() to run the program

Use all type of assert to check if the output has the relationship to the expected output.

The final code is to run the project as run()

3. Contract

If you have some error, you can ask me in one of two ways:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyoj-1.0.2-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file pyoj-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyoj-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pyoj-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b6492d78f45b53f9ce14ddaf4379f54bd221d7eced9f469df6040d16e62eef49
MD5 0f4bb56e7323203ace105cebfd7f077f
BLAKE2b-256 cab66611e05a116a651708689da7d327ce6da801aa07315ed0311b137a57c621

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 file

1.0.1

1 file

1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page