Easy JSON wrapper modfied to wrok with suggestions

Related tags

JSONSuggester
Overview

🈷️ Suggester

Easy JSON wrapper modfied to wrok with suggestions.

This was made for small discord bots, for big bots you should not use this.

📥 Usage

Clone this file into your project folder.

Add from suggester import SuggestionBoard to the top of your project.

📄 Docs

board.add_suggestion(content: str, author: int)

Creates a suggestion in the draft category.

Will return the suggestions ID (sID).

"1234567890": {"content": content, "author": author}

board.approve_suggestion(sID: str)

Moves a suggestion from the draft category to the approved category.

Will raise:

  • NoSuchSuggestion: if there is not a suggestion with that sID.

  • SuggestionAlreadyApproved: if the suggestion was already approved.

  • SuggestionWasRejectedBefore: if the suggestion was rejected earlier.

board.reject_suggestion(sID: str)

Moves a suggestion from the draft category to the rejected category.

Will raise:

  • NoSuchSuggestion: if there is not a suggestion with that sID.

  • SuggestionAlreadyRejected: if the suggestion was already rejected.

  • SuggestionWasApprovedBefore: if the suggestion was approved earlier.

board.search(*args, *, sid=None, funnel="?+-*", author=None)

  • kwargs:

    • sid:

      If this kwarg is given, it will return the suggestion with the sID while ignoring all other args and kwargs except funnel

    • funnel:

      Filters suggestions by its status. ?: draft, +: approved, -: rejected.

    • author:

      Filters suggestions by its author.

  • args:

    Filters suggestions if all of the args are in the suggestions content.

Owner
RGBCube
json my beloved
RGBCube
No more boilerplate to check and build a Python object from JSON.

JSONloader This module is for you if you're tired of writing boilerplate that: builds a straightforward Python object from loaded JSON. checks that yo

3 Feb 05, 2022
Same as json.dumps or json.loads, feapson support feapson.dumps and feapson.loads

Same as json.dumps or json.loads, feapson support feapson.dumps and feapson.loads

boris 5 Dec 01, 2021
Convert your JSON data to a valid Python object to allow accessing keys with the member access operator(.)

JSONObjectMapper Allows you to transform JSON data into an object whose members can be queried using the member access operator. Unlike json.dumps in

Owen Trump 4 Jul 20, 2022
JSON Schema validation library

jsonschema A JSON Schema validator implementation. It compiles schema into a validation tree to have validation as fast as possible. Supported drafts:

Dmitry Dygalo 309 Jan 01, 2023
Package to Encode/Decode some common file formats to json

ZnJSON Package to Encode/Decode some common file formats to json Available via pip install znjson In comparison to pickle this allows having readable

ZINC 2 Feb 02, 2022
Make JSON serialization easier

Make JSON serialization easier

4 Jun 30, 2022
Convert Wii UI formats to JSON5 and vice versa

Convert Wii UI formats to JSON5 and vice versa

Pablo Stebler 11 Aug 28, 2022
Roamtologseq - A script loads a json export of a Roam graph and cleans it up for import into Logseq

Roam to Logseq The script loads a json export of a Roam graph and cleans it up f

Sebastian Pech 4 Mar 07, 2022
JSON for Modern C++ Release Scripts

JSON for Modern C++ Release Scripts Preparations Install required tools: make install_requirements. Add required keys to config.json (apparently not c

Niels Lohmann 4 Sep 19, 2022
Python script for converting .json to .md files using Mako templates.

Install Just install poetry and update script dependencies Usage Put your settings in settings.py and .json data (optionally, with attachments) in dat

Alexey Borontov 6 Dec 07, 2021
A tools to find the path of a specific key in deep nested JSON.

如何快速从深层嵌套 JSON 中找到特定的 Key #公众号 在爬虫开发的过程中,我们经常遇到一些 Ajax 加载的接口会返回 JSON 数据。

kingname 56 Dec 13, 2022
Editor for json/standard python data

Editor for json/standard python data

1 Dec 07, 2021
A JSON API for returning Godspeak sentences. Based on the works of Terry A Davis (Rest in Peace, King)

GodspeakAPI A simple API for generating random words ("godspeaks"), inspired by the works of Terrence Andrew Davis (Rest In Peace, King). Installation

Eccentrici 3 Jan 24, 2022
Simple Python Library to convert JSON to XML

json2xml Simple Python Library to convert JSON to XML

Vinit Kumar 79 Nov 11, 2022
A fast JSON parser/generator for C++ with both SAX/DOM style API

A fast JSON parser/generator for C++ with both SAX/DOM style API Tencent is pleased to support the open source community by making RapidJSON available

Tencent 12.6k Dec 30, 2022
RedisJSON - a JSON data type for Redis

RedisJSON is a Redis module that implements ECMA-404 The JSON Data Interchange Standard as a native data type. It allows storing, updating and fetching JSON values from Redis keys (documents).

3.4k Dec 29, 2022
A fast streaming JSON parser for Python that generates SAX-like events using yajl

json-streamer jsonstreamer provides a SAX-like push parser via the JSONStreamer class and a 'object' parser via the ObjectStreamer class which emits t

Kashif Razzaqui 196 Dec 15, 2022
Ibmi-json-beautify - Beautify json string with python

Ibmi-json-beautify - Beautify json string with python

Jefferson Vaughn 3 Feb 02, 2022
Generate code from JSON schema files

json-schema-codegen Generate code from JSON schema files. Table of contents Introduction Currently supported languages Requirements Installation Usage

Daniele Esposti 30 Dec 23, 2022
A Python application to transfer Zeek ASCII (not JSON) logs to Elastic/OpenSearch.

zeek2es.py This Python application translates Zeek's ASCII TSV logs into ElasticSearch's bulk load JSON format. For JSON logs, see Elastic's File Beat

Corelight, Inc. 28 Dec 22, 2022