Skip to main content

typeit brings typed data into your project

Project description

https://travis-ci.org/avanov/typeit.svg?branch=develop https://coveralls.io/repos/github/avanov/typeit/badge.svg?branch=develop Requirements Status Documentation Status Latest PyPI Release

Development status: Beta

Typeit

typeit brings typed data into your project.

$ echo '{"first-name": "Hello", "initial": null, "last_name": "World"}' | typeit gen

The snipped above produces output similar to this:

from typing import Any, NamedTuple, Optional, Sequence
from typeit import type_constructor


class Main(NamedTuple):
    first_name: str
    initial: Optional[Any]
    last_name: str


overrides = {
    Main.first_name: 'first-name',
}


mk_main, serialize_main = type_constructor & overrides ^ Main

Documentation

Documentation is hosted on ReadTheDocs: https://typeit.readthedocs.io/en/develop/

Test framework

Run existing test suite with

$ pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for typeit, version 0.20.0
Filename, size File type Python version Upload date Hashes
Filename, size typeit-0.20.0-py3-none-any.whl (27.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size typeit-0.20.0.tar.gz (23.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page