Skip to main content

Build Status

m9g : Define models for communication between components, handling MarshallinG (m9g)

Usage

import m9g
class Book(m9g.Model):
    id = m9g.IntField(pk=True)
    author = m9g.StringField()

book = Book(id=1, author="Hemingway")
book.serialize()  # JSON as default
'{"id": 1, "author": "Hemingway"}'

Complex types

import datetime

class Author(m9g.Model):
    id = m9g.IntField(pk=True)
    authored_books = m9g.ListField(
            m9g.StringField()
    )
    birth_date = m9g.DateField()

author = Author(
    id=1,
    authored_books=[
            "The Torrents of Spring",
            "The Sun Also Raises",
            "A Farewell To Arms"
    ],
    birth_date = datetime.date(
            year=1899,
            month=7,
            day=21
    )
)
author.serialize()
'{"id": 1, "authored_books": ["The Torrents of Spring", "The Sun Also Raises", "A Farewell To Arms"], "birth_date": "1899-07-21"}'

Contributing

Run tests for python 2.7 / 3.6

    tox

Run one-off test

    tox -- tests/<test_file>.py::<test_name>

Metadata

Release files for m9g 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for m9g 0.0.6
File Size Uploaded Provenance Actions
m9g-0.0.6.tar.gz 22.7 kB Without provenance Details for m9g-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for m9g 0.0.6
File Interpreter ABI Platform Actions
m9g-0.0.6-py2.py3-none-any.whl Python 3, Python 2 none any Details for m9g-0.0.6-py2.py3-none-any.whl

Total release size: 43.8 kB

Release files / m9g-0.0.6.tar.gz

Download URL m9g-0.0.6.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
087b1e0f0beb12b9c514aed4d6df94cfdc1e57a5a5105d560b01455c89ed5a7d
BLAKE2b-256 checksum
How to use checksums
7cef2759126e10d442a650d182190382a34a134874e453dd7cd62a3ae54e4d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release files / m9g-0.0.6-py2.py3-none-any.whl

Download URL m9g-0.0.6-py2.py3-none-any.whl
Size 21.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a770eca08017adb68f913b9978dd9fd77950ab0d28f1172f244d44de46f81e32
BLAKE2b-256 checksum
How to use checksums
4e1a6d9e5c4875ad4e6141cbd7412f6eff5861e1bbba5d70bc9727ee9bd3ad29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Security for m9g 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page