Translate your middle model declarations to OpenAPI, JSONSchema or any other schema you need
Project description
Translate your middle model declarations to OpenAPI, JSONSchema or any other schema you need!
Quick peak
>>> from typing import Dict, List
>>> import middle
>>> class Game(middle.Model):
... name: str = middle.field()
... score: float = middle.field(minimum=0, maximum=10)
... resolution_tested: str = middle.field(pattern="^\d+x\d+$")
... genre: List[str] = middle.field(unique_items=True)
... rating: Dict[str, float] = middle.field(max_properties=5)
>>> data = {
... "name": "Cities: Skylines",
... "score": 9.0,
... "resolution_tested": "1920x1200",
... "genre": ["Simulators", "City Building"],
... "rating": {
... "IGN": 8.5,
... "Gamespot": 8.0,
... "Steam": 4.5
... }
... }
>>> # TO BE CONTINUED
Documentation
License
middle-schema is a free software distributed under the MIT license.
Changelog
v0.1.0 on 2018-07-??
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
middle-schema-0.1.0.tar.gz
(38.4 kB
view hashes)
Built Distribution
Close
Hashes for middle_schema-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64e1ad7dc1254e2a685f168b2fbf78e93594ee0e85cbb1c9f8dafd0c96778179 |
|
MD5 | 49ecee5d6ee5f34e8c26e59913191d4f |
|
BLAKE2b-256 | d994e0540496121010b3e217909717d3fd627a85b36b290be59e4e2804eb6af3 |