Skip to main content

An OpenContest server written in Python

Project description

OpenContest Server

An OpenContest server written using Python's HTTPServer and SQLite, with no external dependencies other than the Python standard library, requests, and Firejail.

Installation

Docker

Run the Docker Hub image:

docker run -d -p 9534:9534 --name opencontest-server -v $PWD/contests:/usr/src/app/contests laduecs/opencontest-server:latest

Note: $PWD/contests is where the contests folder in the container is mapped to on the host and by default creates a new folder called contests in the current directory. It can be replaced with the full path to a different if desired.

AUR

Install the opencontest-server-git from the AUR:

paru -S opencontest-server-git

Start the server with systemctl start opencontest-server.

Pip

Install opencontest-server with pip:

pip install opencontest-server

Run the server with ocs.

Usage

You can place contests like the sample contest in a contests directory.

For debugging, you can run the server with the --verbose flag.

For production usage, you should put this server behind a reverse proxy like NGINX or Caddy because Python's HTTPServer does not implement any security features. You will also need to a domain name and a TLS certificate which you can easily obtain using Let's Encrypt.

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

opencontest-server-2.8.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

opencontest_server-2.8.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file opencontest-server-2.8.0.tar.gz.

File metadata

  • Download URL: opencontest-server-2.8.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for opencontest-server-2.8.0.tar.gz
Algorithm Hash digest
SHA256 a9ebbebdf99a82557b25f63d9485a35c8e21ea807c7ead9fa33db562112a0221
MD5 8d45db31e90d04f47a80230886109fe0
BLAKE2b-256 68e2fc58d67375ede7781aca2cf3e31590d7154e793c9227db6832745ea9de7f

See more details on using hashes here.

File details

Details for the file opencontest_server-2.8.0-py3-none-any.whl.

File metadata

  • Download URL: opencontest_server-2.8.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for opencontest_server-2.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28aaef278d3e9c920828f912566c860658c707f5eac18c901e2e030d01c3f3a5
MD5 1d29d1b8601d5c91fc5fd4ec6ca0599a
BLAKE2b-256 9b4437bfdc191c1aa84e79173cea6afbc8c4b4a2fa4f09228efa557b005eb4bd

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