semvec/pypi-packages huggingface dataset:
databind-json 2.0.8
De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.7 and newer.
License: MIT
Requires Python: >=3.7,<4.0

# databind.json

The `databind.json` package implements the de-/serialization to or from JSON payloads using
the `databind.core` framework.

## Quickstart

```py
import databind.json
import dataclasses

@dataclasses.dataclass
class ServerConfig:
  host: str
  port: int = 8080

@dataclasses.dataclass
class MainConfig:
  server: ServerConfig

payload = { 'server': { 'host': '127.0.0.1' } }
config = databind.json.load(payload, MainConfig)
assert config == MainConfig(ServerConfig('127.0.0.1'))
```

## Examples for common use cases

### Unions with literal matches

```py
import dataclasses
import databind.json
from typing import Literal

@dataclasses.dataclass
class AwsMachine:
  region: str
  name: str
  instance_id: str
  provider: Literal["aws"] = "aws"

@dataclasses.dataclass
class AzureMachine:
  resource_group: str
  name: str
  provider: Literal["azure"] = "azure"

Machine = AwsMachine | AzureMachine

payload = {"provider": "azure", "resource_group": "foo", "name": "bar"}
assert databind.json.load(payload) == AzureMachine("foo", "bar")
```

---

<p align="center">Copyright &copy; 2020 &ndash; Niklas Rosenstein</p>
databind-core 2.0.8
Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.7 and newer.
License: MIT
Requires Python: >=3.7,<4.0

# databind.core

`databind.core` provides a jackson-databind inspired framework for data de-/serialization in Python. Unless you
are looking to implement support for de-/serializing new data formats, the `databind.core` package alone might
not be what you are looking for (unless you want to use `databind.core.dataclasses` as a drop-in replacement to
the standard library `dataclasses` module, for that check out the section at the bottom).

### Known implementations

* [databind.json](https://pypi.org/project/databind.json)

### Dataclass extension

The standard library `dataclasses` module does not allow to define non-default arguments after default arguments.
You can use `databind.core.dataclasses` as a drop-in replacement to get this feature. It behaves exactly like the
standard library, only that non-default arguments may follow default arguments. Such arguments can be passed to
the constructor as positional or keyword arguments.

```py
from databind.core import dataclasses

@dataclasses.dataclass
class A:
  value1: int = 42

@dataclasses.dataclass
class B(A):
  value2: str

print(B(0, 'Hello, World!'))
print(B(value2='Answer to the universe'))
```

---

<p align="center">Copyright &copy; 2020 &ndash; Niklas Rosenstein</p>
downleth 1.2
downleth: Download ETH streams
License: MIT
Keywords: downleth eth livestream

# Lecture Downloader ETH

Download livestreams, watch livestreams locally (and reliably!)

As always, respect the privacy of the people being recorded and do not publicise anything you record without first requesting permission to do so. `downleth`'s main use case is recording livestreamed lectures and having them immediately available, especially if one is unable to attend lectures in a certain timespan.

## Installation

Install `downleth`:

```bash
pip install downleth
```

Make sure you have `ffmpeg` installed.

## Usage

To schedule a lecture recording based on a config:

```bash
downleth --log-level INFO exec sample-config.json
```

For structuring your configuration file, see `sample-config.json`. There is also a `config.schema.json` JSON schema.

## Development

`pipenv` is used. Use:

```bash
PIPENV_VENV_IN_PROJECT=1 pipenv install
```

The `vscode` task might help you get started with debugging.

## TODO

- Automatically generate configuration file per semester from myStudies, fetch room numbers, etc. automatically
- Allow spinning up local server to watch lectures without web client
- Allow configuring codecs (save storage)
- Automatically cut breaks somehow
- Automatically detect start/end of lecture (might sometimes end a bit later or start a bit earlier)
- Consider holidays
- Use GitHub actions to publish, maybe GitVersion to version it
- Allow downloading recordings form video.ethz.ch