semvec/pypi-packages huggingface dataset:
smartcast 0.2.0
Recursively cast json to python dataclasses, typing, and class. Also provides reverse.
Requires Python: >=3.7,<3.10

# Smart Cast

Recursively cast json to python `dataclasses`, `typing`, and `class`

# Features
Supports
- `List[TV]`
- `Dict[TK, TV]`
- `Optional[TV]`
- `Union`
- `dict`
- `list`
- `dataclass`
- `int`
- `str`
- `float`
- `boolean`
- `datetime`

# useage
```python
from smartcast import normal, cast
from typing import List, Optional, Union
import json
from dataclasses import dataclass
from enum import Enum, auto


class Option(Enum):
    A = auto()
    B = auto()


@dataclass
class Config:
    value: Option


def test_simple():
    value = Config(Option.A)
    nobj = normal(value)
    jstr = json.dumps(nobj)
    jobj = json.loads(jstr)
    revalue = cast(jobj, Config)
    assert value == revalue

```
discord-du 1.0.0
A API wrapper for Dangerous Users Data Base
Requires Python: >=3.6

# du.py
🦴 A Python API for Dangerous Users DB!

## Install
Just put in a terminal this simple command:
```sh
# For Linux
sudo pip3 install discord-du

# For others systems (Windows, MacOS...)
pip install discord-du
```

## Basic usage
```python
from dudb import DUapi

# Note: by default, it will look for discord.riverside.rocks website.
# If you want to change the instance, add the argument "url":
# du = DUapi(url = "https://discord.example.com")
du = DUapi(token="Your token")

# Get status of a user
print(du.getStatus("466262009256869889"))

# Report a user
du.report("466262009256869889", "He spammed my server")

# Get basic stats from the current instance
print(du.getStats())

# Delete all reports from the account where the API token was generated
du.deleteAllReports()

# Get the user whitelist of the current instance
print(du.getWhitelist())
```

## License
This repository is licensed under the [MIT License](./LICENSE).