Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wizardofzos/aoc2021

Advent of Code 2021 - z/OS Flask REST Solutions (runnning python and REXX lol)
https://github.com/wizardofzos/aoc2021

Last synced: 3 months ago
JSON representation

Advent of Code 2021 - z/OS Flask REST Solutions (runnning python and REXX lol)

Awesome Lists containing this project

README

        

# AOC 2021 on z/OS

Based on https://github.com/wizardofzos/flask-rest-zos/

## What's this?

Repo for my solutions to AOC2021. More info: https://adventofcode.com/2021
Wanted to have some extra practice on flask-rest and also do some REXX.

So I've made this REST API that either runs python code, or REXX and shows the result...

## Requirements

- Conda installed
- Python available
- Network connectivity to the outside world

## Preparing for first run

conda activate
git clone [email protected]:wizardofzos/flask-rest-zos.git
cd flask-rest-zos
python -m venv .
. bin/activate
python3 -m pip install -r requirements.txt

## Running it
conda activate
cd ../../flask-rest-zos
. bin/activate
# Optional if you want another port than 12345
export PORT=
python3 aoc2021.py

Then point your browser to http://:12345/swagger-ui and...

![AOC2021](https://github.com/wizardofzos/aoc2021/blob/main/aoc2021-startup.png?raw=true)


## Adding endpoints to the REST-API

Every endpoint has it's own file in /endpoints. Make sure to add your new endpoints to /endpoints/__init__.py with a line like so:

from . import

Then in test-app.py add these lines:

from endpoints import
api.add_resource(, '/)

And off you go :)

# TODO
Write how to add new solutions :)