๐ŸŒŽ The Modern Declarative Data Flow Framework for the AI Empowered Generation.

Overview

๐ŸŒŽ JSONClasses Pypi Python Version License PR Welcome

JSONClasses is a declarative data flow pipeline and data graph framework.

Official Website: https://www.jsonclasses.com

Official Documentation: https://docs.jsonclasses.com

๐Ÿš— Features

Features
๐Ÿ›  Data Modeling Declarative data model with Python type hints
๐Ÿธ Data Sanitization Two strictness modes
๐Ÿฉบ Data Validation Descriptive data validation rules without even a line of code
๐Ÿงฌ Data Transformation Intuitive with modifier pipelines
๐Ÿฆ– Data Presentation Custom key encoding & decoding strategies
๐ŸŒ Data Graphing Models are linked with each other on the same graph
๐Ÿ„โ€โ™‚๏ธ Data Querying Well-designed protocols and implementations for databases
๐Ÿš€ Synthesized CRUD Only with a line of code
๐Ÿ‘ฎโ€โ™€๏ธ Session & Authorization Builtin support for session and authorization
๐Ÿ” Permission System Supports both object level and field level
๐Ÿ“ File Uploading A configuration is enough for file uploading
๐Ÿ“ฆ Data Seeder Declarative named graph relationship

๐ŸŽ Getting Started

Prerequisites

Python >= 3.10 is required. You can download it here.

Install JSONClasses

Install JSONClasses is simple with pip.

pip install jsonclasses

Install Components

Depends on your need, you can install ORM integration and HTTP library integration with the following commands.

pip install jsonclasses-pymongo jsonclasses-server

๐ŸŽน Examples

Business Logic Examples

Example 1: Dating App Users

Let's say, you are building the base user functionality for a cross-platform dating app.

The product requirements are:

  1. Unique phone number is required
  2. Password should be secure, encrypted, hidden from response
  3. Gender cannot be changed after set
  4. This product is adult only
  5. User intro should be brief

Let's transform the requirements into code.

from jsonclasses import jsonclass, types
from jsonclasses_pymongo import pymongo
from jsonclasses_server import api


@api
@pymongo
@jsonclass
class User:
    id: str = types.readonly.str.primary.mongoid.required
    phone_no: str = types.str.unique.index.match(local_phone_no_regex).required #1
    email: str = types.str.match(email_regex)
    password: str = types.str.writeonly.length(8, 16).match(secure_password_regex).transform(salt).required #2
    nickname: str = types.str.required
    gender: str = types.str.writeonce.oneof(['male', 'female']) #3
    age: int = types.int.min(18).max(100) #4
    intro: str = types.str.truncate(500) #5
    created_at: datetime = types.readonly.datetime.tscreated.required
    updated_at: datetime = types.readonly.datetime.tsupdated.required

โšฝ๏ธ Database & HTTP Library Integrations

๐Ÿฆธ Contributing

  • File a bug report. Be sure to include information like what version of YoMo you are using, what your operating system is, and steps to recreate the bug.
  • Suggest a new feature.

๐Ÿคน๐Ÿปโ€โ™€๏ธ Feedback

Any questions or good ideas, please feel free to come to our Discussion. Any feedback would be greatly appreciated!

License

MIT License

You might also like...
Source code for the GPT-2 story generation models in the EMNLP 2020 paper "STORIUM: A Dataset and Evaluation Platform for Human-in-the-Loop Story Generation"

Storium GPT-2 Models This is the official repository for the GPT-2 models described in the EMNLP 2020 paper [STORIUM: A Dataset and Evaluation Platfor

A weakly-supervised scene graph generation codebase. The implementation of our CVPR2021 paper ``Linguistic Structures as Weak Supervision for Visual Scene Graph Generation''
A weakly-supervised scene graph generation codebase. The implementation of our CVPR2021 paper ``Linguistic Structures as Weak Supervision for Visual Scene Graph Generation''

README.md shall be finished soon. WSSGG 0 Overview 1 Installation 1.1 Faster-RCNN 1.2 Language Parser 1.3 GloVe Embeddings 2 Settings 2.1 VG-GT-Graph

Image-generation-baseline - MUGE Text To Image Generation Baseline

MUGE Text To Image Generation Baseline Requirements and Installation More detail

The source code for the Cutoff data augmentation approach proposed in this paper: "A Simple but Tough-to-Beat Data Augmentation Approach for Natural Language Understanding and Generation".

Cutoff: A Simple Data Augmentation Approach for Natural Language This repository contains source code necessary to reproduce the results presented in

Neural machine translation between the writings of Shakespeare and modern English using TensorFlow

Shakespeare translations using TensorFlow This is an example of using the new Google's TensorFlow library on monolingual translation going from modern

Aircraft design optimization made fast through modern automatic differentiation
Aircraft design optimization made fast through modern automatic differentiation

Aircraft design optimization made fast through modern automatic differentiation. Plug-and-play analysis tools for aerodynamics, propulsion, structures, trajectory design, and much more.

A modern pure-Python library for reading PDF files

pdf A modern pure-Python library for reading PDF files. The goal is to have a modern interface to handle PDF files which is consistent with itself and

Weakly Supervised Learning of Rigid 3D Scene Flow
Weakly Supervised Learning of Rigid 3D Scene Flow

Weakly Supervised Learning of Rigid 3D Scene Flow This repository provides code and data to train and evaluate a weakly supervised method for rigid 3D

Comments
Owner
Fillmula Inc.
Fillmula Inc.
Just Go with the Flow: Self-Supervised Scene Flow Estimation

Just Go with the Flow: Self-Supervised Scene Flow Estimation Code release for the paper Just Go with the Flow: Self-Supervised Scene Flow Estimation,

Himangi Mittal 50 Nov 22, 2022
The materials used in the SaxonJS tutorial presented at Declarative Amsterdam, 2021

SaxonJS-Tutorial-2021, version 1.0.4 Last updated on 4 November, 2021. Table of contents Background Prerequisites Starting a web server Running a Java

Saxonica 11 Oct 23, 2022
AI Flow is an open source framework that bridges big data and artificial intelligence.

Flink AI Flow Introduction Flink AI Flow is an open source framework that bridges big data and artificial intelligence. It manages the entire machine

null 144 Dec 30, 2022
๐Ÿ”ฅ Cogitare - A Modern, Fast, and Modular Deep Learning and Machine Learning framework for Python

Cogitare is a Modern, Fast, and Modular Deep Learning and Machine Learning framework for Python. A friendly interface for beginners and a powerful too

Cogitare - Modern and Easy Deep Learning with Python 76 Sep 30, 2022
Official PyTorch code for Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021)

Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021) This repository is the official P

Jingyun Liang 159 Dec 30, 2022
Official PyTorch code for Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021)

Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling (HCFlow, ICCV2021) This repository is the official P

Jingyun Liang 159 Dec 30, 2022
Flow is a computational framework for deep RL and control experiments for traffic microsimulation.

Flow Flow is a computational framework for deep RL and control experiments for traffic microsimulation. See our website for more information on the ap

null 867 Jan 2, 2023
Official code for "Towards An End-to-End Framework for Flow-Guided Video Inpainting" (CVPR2022)

E2FGVI (CVPR 2022) English | ็ฎ€ไฝ“ไธญๆ–‡ This repository contains the official implementation of the following paper: Towards An End-to-End Framework for Flo

Media Computing Group @ Nankai University 537 Jan 7, 2023
data/code repository of "C2F-FWN: Coarse-to-Fine Flow Warping Network for Spatial-Temporal Consistent Motion Transfer"

C2F-FWN data/code repository of "C2F-FWN: Coarse-to-Fine Flow Warping Network for Spatial-Temporal Consistent Motion Transfer" (https://arxiv.org/abs/

EKILI 46 Dec 14, 2022