Skip to main content

Project generated with PyScaffold PyPI-Server

ExamUploader

A Web application to upload exam files to by SaveSumbitExam!

Installation

  1. Create the user examuploader, create some directories in its home-directory and revoke other users access to them.
# as user root:
adduser --disabled-password examuploader
mkdir /home/examuploader/{etc,secrets,upload}
chmod o-rwx /home/examuploader -R
chown examuploader:examuploader /home/examuploader -R
  1. As user examuploader create a virtualenv within its home-directory and install the ExamUploader within.
# as user examuploader:
cd ~
python3 -m venv venv
. ./venv/bin/activate
pip install examuploader-sebastian-stigler
  1. Create a config file, where you specify the upload_path and a list of courses, that are allowed to upload files. Within the each course you specify the course name (which is used as the name of the subdirectory in the upload_path for it) and a list of jupyterhub usernames of the students in this course either directly or as a name prefix by appending an asteriks to the end (and only the end) of it. Make sure, that the course name follows the pattern ^[a-z0-9-]+$ and the student name (prefix) follows the pattern ^[a-zA-Z0-9-]+$.
# as user examuploader
# /home/examuploader/etc/config.yaml

upload_path: /home/examuploader/upload
courses:
  - name: python101
    students:
      - heinz
      - python101-*
  1. Create a systemd service file
# /etc/systemd/system/examuploader.service
# systemd service file to start the examuploader

[Unit]
Description=ExamUploader backend
Wants=network.target
Documentation=https://in-stigler.htw-aalen.de/gitea/tools/examuploader

[Service]
Type=simple
User=examuploader
Group=examuploader
WorkingDirectory=/home/examuploader

Environment=EXAM_UPLOADER_SECRETS_DIR=/home/examuploader/secrets
Environment=EXAM_UPLOADER_CONFIG=/home/examuploader/etc/config.yaml

ExecStart=/home/examuploader/venv/bin/uvicorn examuploader.main:app --host 127.0.0.1 --port 8000 --workers 3
# Use SIGINT to stop
KillSignal=SIGINT
# Auto restart on crash
Restart=on-failure
RestartSec=20
# Tag things in the log
SyslogIdentifier=ExamUploader
#StandardOutput=syslog

[Install]
WantedBy=multi-user.target

and install and activate the serivices.

# Enable and start the service
systemctl daemon-reload
systemctl enable examuploader.service
systemctl start examuploader.service

Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.

Metadata

Release files for examuploader-sebastian-stigler 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for examuploader-sebastian-stigler 0.2.2
File Size Uploaded Provenance Actions
examuploader-sebastian-stigler-0.2.2.tar.gz 22.3 kB Without provenance Details for examuploader-sebastian-stigler-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for examuploader-sebastian-stigler 0.2.2
File Interpreter ABI Platform Actions
examuploader_sebastian_stigler-0.2.2-py3-none-any.whl Python 3 none any Details for examuploader_sebastian_stigler-0.2.2-py3-none-any.whl

Total release size: 31.3 kB

Release files / examuploader-sebastian-stigler-0.2.2.tar.gz

Download URL examuploader-sebastian-stigler-0.2.2.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
58dfa8e912a0f3161ae5cabcf3b9d7e6cbc87f177e70469f68fd3ac48e2430c4
BLAKE2b-256 checksum
How to use checksums
51b0bcab620fc072e22ad453937b210ffca28f409a68d72016711651ef3ae0b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / examuploader_sebastian_stigler-0.2.2-py3-none-any.whl

Download URL examuploader_sebastian_stigler-0.2.2-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f446827d6bbbcf759dd199c41e00cdb6deb5fa7354d4d45dd2c49072854f37ab
BLAKE2b-256 checksum
How to use checksums
9b2be16e587654735e735be2b7c2776b22c072a1fe10bc19aacb451af470337f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for examuploader-sebastian-stigler 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files No provenance

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