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-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyoj-1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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-py3-none-any.whl
Algorithm Hash digest
SHA256 690314242a1e5d8985630e559153524301b8a27017d28bee10654847c4820743
MD5 7ebc9b69abd6da436aa5754eabfa46a6
BLAKE2b-256 3567b9f506b3890c95e948bcf5f2f1d29f97a80cfe8c664cc8287a84b06a89b8

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.2

1 file

1.0.1

1 file

This release

1.0 This release

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